added role for posts

This commit is contained in:
SlimusMinus
2026-06-30 00:29:13 +03:00
parent 3f5aabdbd9
commit 1aee780ba1
6 changed files with 48 additions and 25 deletions

View File

@@ -105,6 +105,7 @@ public class PostService {
PostResponse response = mapper.toResponse(post);
response.setLikeCount(likeCounts.getOrDefault(post.getId(), 0L));
response.setFavorite(finalUserFavoriteIds.contains(post.getId()));
response.setUserRole(post.getUser().getRole());
return response;
})
.toList();