X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FLikeAjaxPage.java;h=17438d4af3386cbe5c94cc00dbec037a8a520ebd;hp=1a49ccd831bdb2b2c5af4af94304812e5e898b1c;hb=70436af0f273c1cc883744ba6b4a15ac080aed98;hpb=9e51cdd24c4de3629254ac75a70f21183daf1c3f diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/LikeAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/LikeAjaxPage.java index 1a49ccd..17438d4 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/LikeAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/LikeAjaxPage.java @@ -55,8 +55,10 @@ public class LikeAjaxPage extends JsonPage { } if ("post".equals(type)) { currentSone.addLikedPostId(id); + webInterface.getCore().saveSone(currentSone); } else if ("reply".equals(type)) { currentSone.addLikedReplyId(id); + webInterface.getCore().saveSone(currentSone); } else { return createErrorJsonObject("invalid-type"); }