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.
*
// JSONPAGE METHODS
//
- /**
- * {@inheritDoc}
- */
@Override
protected JsonReturnObject createJsonObject(FreenetRequest request) {
String postId = request.getHttpRequest().getParam("post");
- Optional<Post> post = webInterface.getCore().getPost(postId);
+ Optional<Post> post = webInterface.getCore().getDatabase().getPost(postId);
if (!post.isPresent()) {
return createErrorJsonObject("invalid-post-id");
}