Add a core thread that periodically saves the configuration.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / LikeAjaxPage.java
index 17438d4..bf87ead 100644 (file)
@@ -36,7 +36,7 @@ public class LikeAjaxPage extends JsonPage {
         *            The Sone web interface
         */
        public LikeAjaxPage(WebInterface webInterface) {
-               super("ajax/like.ajax", webInterface);
+               super("like.ajax", webInterface);
        }
 
        /**
@@ -55,10 +55,10 @@ public class LikeAjaxPage extends JsonPage {
                }
                if ("post".equals(type)) {
                        currentSone.addLikedPostId(id);
-                       webInterface.getCore().saveSone(currentSone);
+                       webInterface.getCore().touchConfiguration();
                } else if ("reply".equals(type)) {
                        currentSone.addLikedReplyId(id);
-                       webInterface.getCore().saveSone(currentSone);
+                       webInterface.getCore().touchConfiguration();
                } else {
                        return createErrorJsonObject("invalid-type");
                }