From 60d1bf769f4f797614c32c10411d6b1370f600dc Mon Sep 17 00:00:00 2001 From: ls-rain Date: Tue, 23 Dec 2025 21:50:52 +0900 Subject: [PATCH] [refactor/#191] Refactoring getCommunityDetail ResponseDTO --- .../com/example/helloworldmvc/converter/CommunityConverter.java | 1 + .../com/example/helloworldmvc/web/dto/CommunityResponseDTO.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/java/com/example/helloworldmvc/converter/CommunityConverter.java b/src/main/java/com/example/helloworldmvc/converter/CommunityConverter.java index 028ac79..ae955fb 100644 --- a/src/main/java/com/example/helloworldmvc/converter/CommunityConverter.java +++ b/src/main/java/com/example/helloworldmvc/converter/CommunityConverter.java @@ -68,6 +68,7 @@ public static CommunityResponseDTO.PostDetailDTO toPostDetailDTO(Community commu return CommunityResponseDTO.PostDetailDTO.builder() .title(community.getTitle()) .content(community.getContent()) + .category_id(toCategoryId(community.getCommunityCategory())) .created_at(community.getCreatedAt()) .isOwner(isOwner) .fileList(list) diff --git a/src/main/java/com/example/helloworldmvc/web/dto/CommunityResponseDTO.java b/src/main/java/com/example/helloworldmvc/web/dto/CommunityResponseDTO.java index 6363f76..2124f8c 100644 --- a/src/main/java/com/example/helloworldmvc/web/dto/CommunityResponseDTO.java +++ b/src/main/java/com/example/helloworldmvc/web/dto/CommunityResponseDTO.java @@ -46,6 +46,7 @@ public static class PostDTO{ public static class PostDetailDTO{ String title; String content; + Long category_id; LocalDateTime created_at; List fileList; List commentDTOList;