Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mathieu Féry
M1Alma WebAndCloud Server
Commits
788ff6e7
Unverified
Commit
788ff6e7
authored
Dec 09, 2021
by
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
Changes
1
Pipelines
8
Hide whitespace changes
Inline
Side-by-side
src/main/java/fr/univnantes/webandcloud/api/core/Post.java
View file @
788ff6e7
...
...
@@ -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
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment