-
Notifications
You must be signed in to change notification settings - Fork 1
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
프로젝트 기술 스택 및 멤버 카테고리 별로 조회되도록 응답 객체 수정 #235
Conversation
📝 Jacoco Test Coverage
|
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.
아침에 봤는데 리뷰를 좀 늦게했습니다ㅠㅠㅠ 생성 수정 부분에도 반영해주셔서 너무너무 감사합니다!!!ㅠㅠ
|
||
private List<MemberSummary> generateMemberSummaries(List<Member> members) { | ||
Map<String, List<UserSummary>> memberMap = members.stream() | ||
.collect(groupingBy(Member::getRole, | ||
mapping(member -> UserSummary.of(member.getUser(), member.getNickname()), | ||
toList()))); | ||
|
||
return memberMap.entrySet().stream() | ||
.map(entry -> MemberSummary.of(entry.getKey(), entry.getValue())) | ||
.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.
👍 감사합니다ㅠㅠ 새로 배워가네요ㅠㅠ
// 멤버(회원, 비회원) | ||
public static UserSummary of(User user, String nickname) { | ||
Long userId = Objects.isNull(user) ? null : user.getId(); | ||
String profileImageUrl = Objects.isNull(user) ? BLANK_STRING : user.getProfileImageUrl(); |
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.
코드 중복 줄여주셔서 감사합니다ㅠㅠ
🎫 관련 이슈
Resolves #230
✅ 구현 내용
💬 코멘트
기존 코드와 변경된 부분이 조금 많이 있습니다..! 혹시 확인하시고 궁금하신 점이 있다면 편하게 알려주세요!