feat: show post participants

This commit is contained in:
Tim
2025-07-10 16:03:02 +08:00
parent 86134a2a7c
commit 2b9b664aa2
5 changed files with 32 additions and 5 deletions

View File

@@ -128,6 +128,9 @@ public class PostController {
.collect(Collectors.toList());
dto.setComments(comments);
java.util.List<com.openisle.model.User> participants = commentService.getParticipants(post.getId(), 5);
dto.setParticipants(participants.stream().map(this::toAuthorDto).collect(Collectors.toList()));
return dto;
}
@@ -219,6 +222,7 @@ public class PostController {
private long views;
private List<CommentDto> comments;
private List<ReactionDto> reactions;
private java.util.List<AuthorDto> participants;
}
@Data