Skip to content

Commit 3af72cc

Browse files
committed
[Feat]: 응답 DTO 게시글 작성자 추가
1 parent ebc70e7 commit 3af72cc

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

back/src/main/java/com/back/domain/post/dto/PostResponse.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public record PostResponse(
1818
Long id,
1919
String title,
2020
String content,
21+
String author,
2122
PostCategory category,
2223
boolean hide,
2324
int likeCount,

back/src/main/java/com/back/domain/post/mapper/PostMapper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public static PostResponse toResponse(Post post) {
2626
post.getId(),
2727
post.getTitle(),
2828
post.getContent(),
29+
post.getUser().getNickname(),
2930
post.getCategory(),
3031
post.isHide(),
3132
post.getLikeCount(),

0 commit comments

Comments
 (0)