import net.pterodactylus.sone.data.Post;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.sone.web.WebInterface;
+import net.pterodactylus.sone.web.page.FreenetRequest;
import net.pterodactylus.util.json.JsonObject;
/**
* {@inheritDoc}
*/
@Override
- protected JsonObject createJsonObject(Request request) {
+ protected JsonObject createJsonObject(FreenetRequest request) {
String type = request.getHttpRequest().getParam("type", null);
String id = request.getHttpRequest().getParam(type, null);
if ((id == null) || (id.length() == 0)) {
}
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");
}