-
Notifications
You must be signed in to change notification settings - Fork 4
Comment and Reply ResponseData now contains Heart #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…mentHeartRepository interface
…mentHeart method at CommentHeartService class
…entResponseData method in Comment class
…entResponseData method in Reply class
mikekang47
left a comment
There was a problem hiding this 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dto 변환 위치 변경하시느라 고생 많으셨습니다 :)
| List<Comment> comments = commentService.getComments(); | ||
| return comments.stream().map(Comment::toCommentResponseData).collect(Collectors.toList()); |
There was a problem hiding this comment.
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))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyMat를 사용하면 객체끼리 바로 비교가 가능한가보군요!
찾아 봐야겠어요
No description provided.