From 4af936d78b8dc1e40e9a6b65e2889cb92622735a Mon Sep 17 00:00:00 2001 From: ybchar Date: Sun, 7 Apr 2024 09:46:28 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20hearts=20=EC=88=98=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/board/dto/response/FindOneBoardResponse.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/unit/daybook/domain/board/dto/response/FindOneBoardResponse.java b/src/main/java/com/unit/daybook/domain/board/dto/response/FindOneBoardResponse.java index 31adbe2..fb62e55 100644 --- a/src/main/java/com/unit/daybook/domain/board/dto/response/FindOneBoardResponse.java +++ b/src/main/java/com/unit/daybook/domain/board/dto/response/FindOneBoardResponse.java @@ -25,14 +25,13 @@ public record FindOneBoardResponse( ) { public static FindOneBoardResponse of(Board board, List reactions, List comments) { List 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,