From f33439e8f6a00887dae06028ea001c7f0c2bde1f Mon Sep 17 00:00:00 2001 From: Beakjiyeon Date: Sun, 7 Apr 2024 07:39:57 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20boards=20=EC=9D=91=EB=8B=B5=20=ED=98=95?= =?UTF-8?q?=ED=83=9C=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/board/dto/response/FindBoardResponse.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/unit/daybook/domain/board/dto/response/FindBoardResponse.java b/src/main/java/com/unit/daybook/domain/board/dto/response/FindBoardResponse.java index 2e3fde9..a19a28e 100644 --- a/src/main/java/com/unit/daybook/domain/board/dto/response/FindBoardResponse.java +++ b/src/main/java/com/unit/daybook/domain/board/dto/response/FindBoardResponse.java @@ -1,6 +1,7 @@ package com.unit.daybook.domain.board.dto.response; import java.time.LocalDateTime; +import java.util.List; import com.unit.daybook.domain.board.entity.Board; @@ -10,9 +11,11 @@ public record FindBoardResponse( Long respectBoardId, Long authorId, String category, + Long hearts, String paperType, - LocalDateTime createdAt + LocalDateTime createdAt, + List hashtags ) { public static FindBoardResponse from(Board board) { return new FindBoardResponse( @@ -23,7 +26,8 @@ public static FindBoardResponse from(Board board) { board.getCategory(), board.getHearts(), board.getPaperType(), - board.getCreatedAt() + board.getCreatedAt(), + board.getHashtags().stream().map(h->h.getContent()).toList() ); } }