Skip to content

Conversation

@linuxlight
Copy link
Collaborator

No description provided.

Copy link
Owner

@mikekang47 mikekang47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고 많으셨어요...!

if (userComments.isEmpty())
throw new CommentNotFoundException();
return getCommentResponseDataList(userComments);
return userComments;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dto 변환 위치 변경하시느라 고생 많으셨습니다 :)

Comment on lines +49 to +50
List<Comment> comments = commentService.getComments();
return comments.stream().map(Comment::toCommentResponseData).collect(Collectors.toList());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

map 을 잘 활용하셨어요!

.commentId(id)
.userProfile(user.toUserProfileData())
.content(content)
.heartPresent(hearts.stream().anyMatch(heart -> heart.getUser().equals(user)))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anyMat를 사용하면 객체끼리 바로 비교가 가능한가보군요!
찾아 봐야겠어요

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants