Move retrieval of post likes from Core to Post.
[Sone.git] / src / main / java / net / pterodactylus / sone / fcp / LikePostCommand.java
index d2acb4a..4a88ce1 100644 (file)
@@ -47,7 +47,7 @@ public class LikePostCommand extends AbstractSoneCommand {
                Post post = getPost(parameters, "Post");
                Sone sone = getMandatoryLocalSone(parameters, "Sone");
                post.like(sone);
-               return new Response("PostLiked", new SimpleFieldSetBuilder().put("LikeCount", getCore().getLikes(post).size()).get());
+               return new Response("PostLiked", new SimpleFieldSetBuilder().put("LikeCount", post.getLikes().size()).get());
        }
 
 }