Unverified Commit 788ff6e7 authored by Féry Mathieu (Mathius)'s avatar Féry Mathieu (Mathius)
Browse files

feat(post): Add count of likes

parent 75c290a4
Pipeline #34529 passed with stages
in 4 minutes and 30 seconds
......@@ -88,4 +88,9 @@ public class Post implements WithAncestor<User> {
return this.getAuthor().getId();
}
@Schema(description = "Number of Users that liked this post", example = "2")
public Integer getNbFollowers() {
return getLikes() != null ? getLikes().size() : null;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment