Skip to content

Commit 3f708ca

Browse files
committed
fix(post) : 사용자 아이디 response 추가
1 parent 8b7d17a commit 3f708ca

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/main/java/com/example/FixLog/dto/post/PostDto.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
@Getter
99
@AllArgsConstructor
1010
public class PostDto {
11+
private Long userId;
1112
private String nickname;
1213
private String postTitle;
1314
private String coverImageUrl;

src/main/java/com/example/FixLog/service/PostService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ public PostResponseDto viewPost(Long postId){
165165
.orElseThrow(() -> new CustomException(ErrorCode.POST_NOT_FOUND));
166166

167167
PostDto postInfo = new PostDto(
168+
currentPost.getUserId().getUserId(),
168169
currentPost.getUserId().getNickname(),
169170
currentPost.getPostTitle(),
170171
getDefaultImage(currentPost.getCoverImage()),

0 commit comments

Comments
 (0)