Skip to content

Commit

Permalink
feat : member 조회시 branch 추가 (#109)
Browse files Browse the repository at this point in the history
* feat : member 조회시 branch 추가

* feat : FE가 요청한 response 변수명으로 변경
  • Loading branch information
dnd2dnd authored Dec 27, 2024
1 parent 6e03589 commit f4aeab2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ public GetMemberProfileResponse getMemberProfileBy(AuthCredentials authCredentia
member.getWorkingPlace(),
member.getIntroduce(),
mapToMemberSkills(member),
mapToMemberPurposes(member)
mapToMemberPurposes(member),
mapToMemberBranches(member)
);
}

Expand All @@ -87,6 +88,12 @@ private List<MemberProfileSkillResponse> mapToMemberSkills(Member member) {
.collect(Collectors.toList());
}

private List<String> mapToMemberBranches(Member member) {
return member.getBranches().stream()
.map(branch -> branch.getBranch().getName())
.toList();
}

@Transactional(readOnly = true)
public List<MemberIdeaResponse> findMemberIdeas(AuthCredentials authCredentials, Long id,
Pageable pageable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ public record GetMemberProfileResponse(
@ArraySchema( arraySchema = @Schema(
description = "가입목적",
example ="[\"사이드프로젝트\", \"공모전\"]"))
List<String> joinPurposes
List<String> joinPurposes,
@ArraySchema( arraySchema = @Schema(
description = "목적",
example ="[\"쇼핑\", \"금융/앱테크\"]"))
List<String> branchList
) {
}

0 comments on commit f4aeab2

Please sign in to comment.