Nantes Université

Skip to content
Extraits de code Groupes Projets
Non vérifiée Valider 8682f0cf rédigé par Féry Mathieu (Mathius)'s avatar Féry Mathieu (Mathius)
Parcourir les fichiers

feat(Users): Add count of follows and followers

parent b902e4cc
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #34497 réussi
......@@ -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;
}
}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter