Skip to content

Commit

Permalink
feat: hearts 수 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
char-yb committed Apr 7, 2024
1 parent f675c5f commit 4af936d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ public record FindOneBoardResponse(
) {
public static FindOneBoardResponse of(Board board, List<ReactionTypeAndCount> reactions, List<FindOneCommentResponse> comments) {
List<String> hashContents = board.getHashtags().stream().map(Hashtag::getContent).toList();
Long heartsFromReactions = reactions.stream().mapToLong(ReactionTypeAndCount::count).sum();
return new FindOneBoardResponse(
board.getBoardId(),
board.getContent(),
board.getRespectBoardId(),
board.getMember().getId(),
board.getCategory(),
heartsFromReactions,
board.getHearts(),
hashContents,
board.getPaperType(),
reactions,
Expand Down

0 comments on commit 4af936d

Please sign in to comment.