X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FDeletePostCommand.java;h=b5ace1d1f53148a8c60eacf428b8236896325f78;hp=e68cbb582dae8ea1d22660d246f37225f29e8866;hb=ffd92ca2374c0b2218e583d02e0bdd24b8c110ae;hpb=c4ae226ec5052116cefc542ae2017036a7bc6332 diff --git a/src/main/java/net/pterodactylus/sone/fcp/DeletePostCommand.java b/src/main/java/net/pterodactylus/sone/fcp/DeletePostCommand.java index e68cbb5..b5ace1d 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/DeletePostCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/DeletePostCommand.java @@ -22,7 +22,6 @@ import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.freenet.SimpleFieldSetBuilder; import net.pterodactylus.sone.freenet.fcp.FcpException; import freenet.support.SimpleFieldSet; -import freenet.support.api.Bucket; /** * FCP command that deletes a {@link Post}. @@ -46,11 +45,12 @@ public class DeletePostCommand extends AbstractSoneCommand { * {@inheritDoc} */ @Override - public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException { + public Response execute(SimpleFieldSet parameters) throws FcpException { Post post = getPost(parameters, "Post"); if (!post.getSone().isLocal()) { return new ErrorResponse(401, "Not allowed."); } + getCore().deletePost(post); return new Response("PostDeleted", new SimpleFieldSetBuilder().get()); }