From 24ac3cea385b00f062990627b05aee60b28c8e71 Mon Sep 17 00:00:00 2001 From: hyojin425 Date: Mon, 19 Aug 2024 16:41:48 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=20=EC=9C=84=ED=81=B4=EB=A6=AC=20=EB=AF=B8?= =?UTF-8?q?=EC=85=98=20=EA=B2=8C=EC=8B=9C=EA=B8=80=20=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EC=9D=91=EB=8B=B5=EA=B0=92=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/stepperbackend/converter/PostConverter.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/example/stepperbackend/converter/PostConverter.java b/src/main/java/com/example/stepperbackend/converter/PostConverter.java index a60ce2f..5c4cd75 100644 --- a/src/main/java/com/example/stepperbackend/converter/PostConverter.java +++ b/src/main/java/com/example/stepperbackend/converter/PostConverter.java @@ -37,8 +37,7 @@ public static PostDto.PostResponseDto toDto(Post post, List imageList) { .body(post.getBody()) .bodyPart(post.getBodyPart() != null ? post.getBodyPart().toString() : null) .authorEmail(post.getMember().getEmail() != null ? post.getMember().getEmail() : null) - .subCategory(post.getSubCategory()) - //.weeklyMissionTitle(post.getWeeklyMission() != null ? post.getWeeklyMission().getMissionTitle() : null) + .subCategory(post.getSubCategory() != null? post.getSubCategory(): null) .weeklyMissionTitle(post.getWeeklyMission() != null ? post.getWeeklyMission().getMissionTitle() : null) .createdAt(post.getCreatedAt()) .updatedAt(post.getUpdatedAt()) @@ -55,10 +54,9 @@ public static PostDto.PostViewDto toViewDto(Post post, int likes, int scraps, in .profileImageUrl(post.getMember().getProfileImage()) .title(post.getTitle()) .body(post.getBody()) - .bodyPart(post.getBodyPart().toString()) + .bodyPart(post.getBodyPart() != null? post.getBodyPart().toString(): null) .authorEmail(post.getMember().getEmail()) - .subCategory(post.getSubCategory()) - // + .subCategory(post.getSubCategory() != null? post.getSubCategory(): null) .likes(likes) .scraps(scraps) .commentsCount(commentsCount)