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

feat(Users): Add count of follows and followers

parent b902e4cc
Pipeline #34497 passed with stages
in 3 minutes and 50 seconds
......@@ -91,4 +91,14 @@ public class User implements WithIdentifier {
public List<Post> getLikedPosts() {
return likedPosts;
}
@Schema(description = "Number of followers of this user", example = "2")
public Integer getNbFollowers() {
return getFollowers() != null ? getFollowers().size() : null;
}
@Schema(description = "Number of follows of this user", example = "2")
public Integer getNbFollows() {
return getFollows() != null ? getFollows().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