Remove PostProvider methods from Core.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / DeletePostPage.java
index 23c2cc1..5cb4b44 100644 (file)
@@ -54,7 +54,7 @@ public class DeletePostPage extends SoneTemplatePage {
                if (request.getMethod() == Method.GET) {
                        String postId = request.getHttpRequest().getParam("post");
                        String returnPage = request.getHttpRequest().getParam("returnPage");
-                       Optional<Post> post = webInterface.getCore().getPost(postId);
+                       Optional<Post> post = webInterface.getCore().getDatabase().getPost(postId);
                        if (!post.isPresent()) {
                                throw new RedirectException("noPermission.html");
                        }
@@ -64,7 +64,7 @@ public class DeletePostPage extends SoneTemplatePage {
                } else if (request.getMethod() == Method.POST) {
                        String postId = request.getHttpRequest().getPartAsStringFailsafe("post", 36);
                        String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256);
-                       Optional<Post> post = webInterface.getCore().getPost(postId);
+                       Optional<Post> post = webInterface.getCore().getDatabase().getPost(postId);
                        if (!post.isPresent() || !post.get().getSone().isLocal()) {
                                throw new RedirectException("noPermission.html");
                        }