X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FDeleteReplyAjaxPage.java;h=c7cbbc1fbf3a80e8a4c51ba7f204e2c5b1765a54;hb=2e03e9dddbea4b81aacaf1aa316f5c3ccffd4bf9;hp=2aa217de92a33014395918b39dba71381b5165f5;hpb=6e9a43ccd93ae125720547c0fe421dc81a54ba90;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/DeleteReplyAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/DeleteReplyAjaxPage.java index 2aa217d..c7cbbc1 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/DeleteReplyAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/DeleteReplyAjaxPage.java @@ -17,12 +17,11 @@ package net.pterodactylus.sone.web.ajax; -import com.google.common.base.Optional; - import net.pterodactylus.sone.data.PostReply; 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 reply. @@ -45,13 +44,10 @@ public class DeleteReplyAjaxPage extends JsonPage { // JSONPAGE METHODS // - /** - * {@inheritDoc} - */ @Override - protected JsonObject createJsonObject(FreenetRequest request) { + protected JsonReturnObject createJsonObject(FreenetRequest request) { String replyId = request.getHttpRequest().getParam("reply"); - Optional reply = webInterface.getCore().getPostReply(replyId); + Optional reply = webInterface.getCore().getDatabase().getPostReply(replyId); if (!reply.isPresent()) { return createErrorJsonObject("invalid-reply-id"); }