Remove a post via the core.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 17 Nov 2010 14:28:04 +0000 (15:28 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 17 Nov 2010 14:28:04 +0000 (15:28 +0100)
src/main/java/net/pterodactylus/sone/web/ajax/DeletePostAjaxPage.java

index 603c013..d874493 100644 (file)
@@ -60,7 +60,7 @@ public class DeletePostAjaxPage extends JsonPage {
                if (!post.getSone().equals(currentSone)) {
                        return createErrorJsonObject("not-authorized");
                }
-               currentSone.removePost(post);
+               webInterface.getCore().deletePost(post);
                return createSuccessJsonObject();
        }