Skip to content

Commit

Permalink
[FIX]: 유저 개인정보 반환시 이미지 추가반환
Browse files Browse the repository at this point in the history
  • Loading branch information
김교휘 authored and 김교휘 committed Sep 22, 2024
1 parent a1667b4 commit dfdeb41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class UserGetUpdateDto {
private String role;
private PartEnum part;
private ClubEnum club;
private String image;

public static UserGetUpdateDto toDto(User user) {
return UserGetUpdateDto.builder()
Expand All @@ -27,12 +28,13 @@ public static UserGetUpdateDto toDto(User user) {
}

@QueryProjection
public UserGetUpdateDto(String name, String email, String phoneNum, String role, PartEnum part, ClubEnum club){
public UserGetUpdateDto(String name, String email, String phoneNum, String role, PartEnum part, ClubEnum club, String image){
this.name=name;
this.email=email;
this.phoneNum=phoneNum;
this.role=role;
this.part=part;
this.club=club;
this.image=image;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public UserGetUpdateDto findUserInfoByUsername(String username) {
user.phoneNum,
roleExpression,
mentor.part.coalesce(mentee.part), // 멘토의 part가 없으면 멘티의 part 사용
mentor.club // 멘토의 club, 멘티인 경우 null
mentor.club, // 멘토의 club, 멘티인 경우 null
user.picture
))
.from(user)
.leftJoin(user.mentor, mentor)
Expand Down

0 comments on commit dfdeb41

Please sign in to comment.