Skip to content

Commit

Permalink
refactor: Modify PostId from MyPageService (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: hyojeongchoi <[email protected]>
Co-authored-by: nusuy <[email protected]>
Co-authored-by: Queue-ri <[email protected]>
  • Loading branch information
4 people committed Nov 26, 2023
1 parent 507ebbb commit 3c8b121
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@

/**
* @author Queue-ri
* @since 2023/11/18
* @author becky
* @author hyojeongchoi
* @author nusuy
* @since 2023/11/23
*/

@RequiredArgsConstructor
Expand Down Expand Up @@ -66,7 +69,7 @@ public List<CommentMetaDto> getAllCommentMeta(String uid) {
List<CommentMetaDto> dtoList = new ArrayList<>();

for(Comment comment : commentList) {
Post post = postRepo.findById(comment.getPostId()).get();
Post post = postRepo.findById(comment.getPost().getId()).get();
ServiceUser user = userRepo.findById(post.getUserUid()).get();
dtoList.add(CommentMetaDto.of(comment, user.getNickname()));
}
Expand Down

0 comments on commit 3c8b121

Please sign in to comment.