X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FUnfollowSoneAjaxPage.java;h=509f629f4a8a36f863a06a05fd84b13be60959f8;hb=9b2dcc3ed5e56a634a6bf4351aa2524e6ae05a99;hp=012b9cfb1c97ac4890ddf41fd91093b46f38ec8e;hpb=47df88512f5288d6a1f5f268cdf787bb4bf169c7;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/UnfollowSoneAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/UnfollowSoneAjaxPage.java index 012b9cf..509f629 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/UnfollowSoneAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/UnfollowSoneAjaxPage.java @@ -44,7 +44,7 @@ public class UnfollowSoneAjaxPage 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 UnfollowSoneAjaxPage extends JsonPage { return new JsonObject().put("success", false).put("error", "auth-required"); } currentSone.removeFriend(sone); + webInterface.getCore().saveSone(currentSone); return new JsonObject().put("success", true); }