Add a core thread that periodically saves the configuration.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / FollowSoneAjaxPage.java
index 5cb03e1..d82ab1d 100644 (file)
@@ -35,7 +35,7 @@ public class FollowSoneAjaxPage extends JsonPage {
         *            The Sone web interface
         */
        public FollowSoneAjaxPage(WebInterface webInterface) {
-               super("ajax/followSone.ajax", webInterface);
+               super("followSone.ajax", webInterface);
        }
 
        /**
@@ -52,7 +52,7 @@ public class FollowSoneAjaxPage extends JsonPage {
                        return createErrorJsonObject("auth-required");
                }
                currentSone.addFriend(soneId);
-               webInterface.getCore().saveSone(currentSone);
+               webInterface.getCore().touchConfiguration();
                return createSuccessJsonObject();
        }