Skip to content

Commit

Permalink
Merge pull request #67 from Modagbul/fix/auth
Browse files Browse the repository at this point in the history
목표보드 조회 시 현재 유저 아이디 추가
  • Loading branch information
minsu20 authored Nov 9, 2023
2 parents 9c261b5 + 26d4ab7 commit f7e2ae9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ public class TeamInfo {
private Integer numOfMember; //소모임원 수
private Category category; //카테고리
private String introduction; //소개
private Long currentUserId; //현재 유저 아이디
private List<TeamMemberInfo> teamMemberInfoList = new ArrayList<>(); //소모임원 정보
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public Team createTeam(CreateTeamRequest createTeamRequest, Member member) {
.build();
}

public GetTeamDetailResponse toTeamDetailResponse(Team team, Integer boardNum, List<TeamMemberInfo> teamMemberInfoList) {
TeamInfo teamInfo = new TeamInfo(team.isDeleted(), team.getDeletionTime(), team.getName(), teamMemberInfoList.size(), team.getCategory(), team.getIntroduction(), teamMemberInfoList);
public GetTeamDetailResponse toTeamDetailResponse(Long memberId, Team team, Integer boardNum, List<TeamMemberInfo> teamMemberInfoList) {
TeamInfo teamInfo = new TeamInfo(team.isDeleted(), team.getDeletionTime(), team.getName(), teamMemberInfoList.size(), team.getCategory(), team.getIntroduction(), memberId, teamMemberInfoList);
return GetTeamDetailResponse.builder()
.boardNum(boardNum)
.teamInfo(teamInfo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public GetTeamDetailResponse getTeamDetailResponse(String socialId, Long teamId)
Integer boardNum = boardGetService.getUnReadBoardNum(teamId, member.getMemberId());
List<TeamMemberInfo> teamMemberInfoList = teamMemberGetService.getTeamMemberInfo(teamId);
Team team = teamGetService.getTeamByTeamId(teamId);
return teamMapper.toTeamDetailResponse(team, boardNum, teamMemberInfoList);
return teamMapper.toTeamDetailResponse(member.getMemberId(), team, boardNum, teamMemberInfoList);
}

public GetCurrentStatusResponse getCurrentStatus(Long teamId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ public void get_team_detail() throws Exception {
.numOfMember(1)
.category(Category.ETC)
.introduction("소모임 소개글")
.currentUserId(1L)
.teamMemberInfoList(teamMemberInfoList).build();

GetTeamDetailResponse output = GetTeamDetailResponse
Expand Down Expand Up @@ -235,6 +236,7 @@ public void get_team_detail() throws Exception {
fieldWithPath("data.teamInfo.introduction").description("모임 소개"),
fieldWithPath("data.teamInfo.isDeleted").description("삭제여부"),
fieldWithPath("data.teamInfo.deletionTime").description("삭제 시간 (삭제 안했으면 null)"),
fieldWithPath("data.teamInfo.currentUserId").description("현재 유저 아이디"),
fieldWithPath("data.teamInfo.teamMemberInfoList[0].memberId").description("유저 아이디"),
fieldWithPath("data.teamInfo.teamMemberInfoList[0].nickName").description("유저 닉네임"),
fieldWithPath("data.teamInfo.teamMemberInfoList[0].profileImage").description("유저 프로필 이미지"),
Expand Down

0 comments on commit f7e2ae9

Please sign in to comment.