Check a reply’s post and its Sone before using those values.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / FollowSoneAjaxPage.java
index e90fa5f..1269b41 100644 (file)
@@ -35,7 +35,7 @@ public class FollowSoneAjaxPage extends JsonPage {
         *            The Sone web interface
         */
        public FollowSoneAjaxPage(WebInterface webInterface) {
-               super("ajax/followSone.ajax", webInterface);
+               super("followSone.ajax", webInterface);
        }
 
        /**
@@ -53,7 +53,7 @@ public class FollowSoneAjaxPage extends JsonPage {
                }
                currentSone.addFriend(soneId);
                webInterface.getCore().saveSone(currentSone);
-               return new JsonObject().put("success", true);
+               return createSuccessJsonObject();
        }
 
 }