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