Remove unnecessary mocks.
[Sone.git] / src / main / java / net / pterodactylus / sone / fcp / LikePostCommand.java
index 20d251c..ed1d42e 100644 (file)
@@ -42,13 +42,10 @@ public class LikePostCommand extends AbstractSoneCommand {
                super(core, true);
        }
 
-       /**
-        * {@inheritDoc}
-        */
        @Override
        public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
                Post post = getPost(parameters, "Post");
-               Sone sone = getSone(parameters, "Sone", true);
+               Sone sone = getMandatoryLocalSone(parameters, "Sone");
                sone.addLikedPostId(post.getId());
                return new Response("PostLiked", new SimpleFieldSetBuilder().put("LikeCount", getCore().getLikes(post).size()).get());
        }