Skip to content

Commit 443abdf

Browse files
committed
fix: 헤드라인 null 허용
1 parent fb1f460 commit 443abdf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/moyeoit/domain/review/controller/response/PremiumReviewListResponse.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public static PremiumReviewListResponse from(PremiumReviewInfo info, List<Premiu
2121
case String s when s.contains("PM") -> "기획";
2222
default -> "기타";
2323
};
24+
String headLine = details.isEmpty() ? "헤드라인 없음" : details.getFirst().getAnswer();
2425

2526
List<String> identifier = List.of(
2627
info.getClubName(),
@@ -32,7 +33,7 @@ public static PremiumReviewListResponse from(PremiumReviewInfo info, List<Premiu
3233
info.getReviewId(),
3334
info.getTitle(),
3435
info.getImageUrl(),
35-
details.getFirst().getAnswer(),
36+
headLine,
3637
identifier,
3738
info.getLikeCount(),
3839
info.getCommentCount()

0 commit comments

Comments
 (0)