We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b7d17a commit 3f708caCopy full SHA for 3f708ca
2 files changed
src/main/java/com/example/FixLog/dto/post/PostDto.java
@@ -8,6 +8,7 @@
8
@Getter
9
@AllArgsConstructor
10
public class PostDto {
11
+ private Long userId;
12
private String nickname;
13
private String postTitle;
14
private String coverImageUrl;
src/main/java/com/example/FixLog/service/PostService.java
@@ -165,6 +165,7 @@ public PostResponseDto viewPost(Long postId){
165
.orElseThrow(() -> new CustomException(ErrorCode.POST_NOT_FOUND));
166
167
PostDto postInfo = new PostDto(
168
+ currentPost.getUserId().getUserId(),
169
currentPost.getUserId().getNickname(),
170
currentPost.getPostTitle(),
171
getDefaultImage(currentPost.getCoverImage()),
0 commit comments