Skip to content

Commit

Permalink
[MODIFY] 마이페이지 디자인 변경사항에 따른 데이터 추가 #117
Browse files Browse the repository at this point in the history
  • Loading branch information
jun02160 committed Feb 19, 2024
1 parent fff933d commit c632c87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@ public static MyUserInfoResponseDto of(User myUser, User opponentUser, Parentchi
}

// 아직 매칭된 유저가 없는 경우
public static MyUserInfoResponseDto of(User myUser) {
public static MyUserInfoResponseDto of(User myUser, Parentchild parentchild) {

return MyUserInfoResponseDto.builder()
.myUsername(myUser.getUsername())
.myUserType(getUserType(parentchild.getRelation(), myUser.isMeChild()))
.opponentUserType(getUserType(parentchild.getRelation(), !myUser.isMeChild()))
.parentchildRelation(parentchild.getRelation().getValue())
.isMeChild(myUser.isMeChild())
.section(QuestionSection.YOUNG.getValue())
.matchedDate(0L)
.qnaCnt(0).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public MyUserInfoResponseDto getUserInfo(final Long userId) {

// 매칭된 상대 유저가 없는 경우
if (opponentUserList.isEmpty()) {
return MyUserInfoResponseDto.of(myUser);
return MyUserInfoResponseDto.of(myUser, parentchild);
}

User opponentUser = getOpponentByParentchild(parentchild, userId);
Expand Down

0 comments on commit c632c87

Please sign in to comment.