X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FDeletePostAjaxPage.java;h=943d6a87ebf5643887a1bd8398f9f52483c2daaf;hb=2e03e9dddbea4b81aacaf1aa316f5c3ccffd4bf9;hp=71b0016adfee393fdc40f9c252a3760cf0e32a4a;hpb=6e9a43ccd93ae125720547c0fe421dc81a54ba90;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/DeletePostAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/DeletePostAjaxPage.java index 71b0016..943d6a8 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/DeletePostAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/DeletePostAjaxPage.java @@ -17,12 +17,11 @@ package net.pterodactylus.sone.web.ajax; -import com.google.common.base.Optional; - import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.web.WebInterface; import net.pterodactylus.sone.web.page.FreenetRequest; -import net.pterodactylus.util.json.JsonObject; + +import com.google.common.base.Optional; /** * This AJAX page deletes a post. @@ -45,13 +44,10 @@ public class DeletePostAjaxPage extends JsonPage { // JSONPAGE METHODS // - /** - * {@inheritDoc} - */ @Override - protected JsonObject createJsonObject(FreenetRequest request) { + protected JsonReturnObject createJsonObject(FreenetRequest request) { String postId = request.getHttpRequest().getParam("post"); - Optional post = webInterface.getCore().getPost(postId); + Optional post = webInterface.getCore().getDatabase().getPost(postId); if (!post.isPresent()) { return createErrorJsonObject("invalid-post-id"); }