X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FFollowSoneAjaxPage.java;h=0c835533fc084fe140f706e121a6b6dac480a0b0;hb=9b2dcc3ed5e56a634a6bf4351aa2524e6ae05a99;hp=5b4fdc2a47fb81aa480f3529e57fb33af3dcfd60;hpb=47df88512f5288d6a1f5f268cdf787bb4bf169c7;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/FollowSoneAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/FollowSoneAjaxPage.java index 5b4fdc2..0c83553 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/FollowSoneAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/FollowSoneAjaxPage.java @@ -44,7 +44,7 @@ public class FollowSoneAjaxPage extends JsonPage { @Override protected JsonObject createJsonObject(Request request) { String soneId = request.getHttpRequest().getParam("sone"); - Sone sone = webInterface.core().getSone(soneId); + Sone sone = webInterface.getCore().getSone(soneId); if (sone == null) { return new JsonObject().put("success", false).put("error", "invalid-sone-id"); } @@ -53,6 +53,7 @@ public class FollowSoneAjaxPage extends JsonPage { return new JsonObject().put("success", false).put("error", "auth-required"); } currentSone.addFriend(sone); + webInterface.getCore().saveSone(currentSone); return new JsonObject().put("success", true); }