X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FDeletePostAjaxPage.java;h=943d6a87ebf5643887a1bd8398f9f52483c2daaf;hb=2835d19c0c20dc13fab9371f8cd56984c9114dab;hp=acf5f0337cbce3d98e6a8a59aa4e31a66dc39ee8;hpb=9fbafff8f3467329e7c8ad24d5d13273962ade28;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 acf5f03..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,12 @@ 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 com.google.common.base.Optional; + /** * This AJAX page deletes a post. * @@ -44,13 +44,10 @@ public class DeletePostAjaxPage extends JsonPage { // JSONPAGE METHODS // - /** - * {@inheritDoc} - */ @Override 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"); }