If no current Sone exists, return an error.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / UnfollowSoneAjaxPage.java
index 3d984b9..3b45f27 100644 (file)
@@ -20,7 +20,6 @@ package net.pterodactylus.sone.web.ajax;
 import net.pterodactylus.sone.data.Sone;
 import net.pterodactylus.sone.web.WebInterface;
 import net.pterodactylus.sone.web.page.FreenetRequest;
-import net.pterodactylus.util.json.JsonObject;
 
 /**
  * AJAX page that lets a Sone unfollow another Sone.
@@ -39,11 +38,8 @@ public class UnfollowSoneAjaxPage extends JsonPage {
                super("unfollowSone.ajax", webInterface);
        }
 
-       /**
-        * {@inheritDoc}
-        */
        @Override
-       protected JsonObject createJsonObject(FreenetRequest request) {
+       protected JsonReturnObject createJsonObject(FreenetRequest request) {
                String soneId = request.getHttpRequest().getParam("sone");
                if (!webInterface.getCore().getSone(soneId).isPresent()) {
                        return createErrorJsonObject("invalid-sone-id");