mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-22 06:50:53 +08:00
feat: show post participants
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user