Skip to content

Commit

Permalink
Merge pull request #180 from dnd-side-project/fix/#179
Browse files Browse the repository at this point in the history
Add email to profile response
  • Loading branch information
miraexhoi authored Oct 4, 2024
2 parents 54f925b + 198b249 commit 6ac7e7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.dnd.spaced.domain.account.domain.QuizInfo;

public record ReadAccountInfoDto(
String email,
String nickname,
String profileImage,
String company,
Expand All @@ -21,6 +22,7 @@ public static ReadAccountInfoDto from(Account account) {
QuizInfo quizInfo = account.getQuizInfo();

return new ReadAccountInfoDto(
account.getEmail(),
account.getNickname(),
account.getProfileImage(),
careerInfo.getCompany().getName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

public record AccountInfoResponse(

@Schema(description = "이메일")
String email,

@Schema(description = "닉네임")
String nickname,

Expand All @@ -28,7 +31,7 @@ public static AccountInfoResponse of(ReadAccountInfoDto dto, String baseUrl, Str
dto.developQuizCount()
);

return new AccountInfoResponse(dto.nickname(), profileImage, careerInfo, quizInfo);
return new AccountInfoResponse(dto.email(), dto.nickname(), profileImage, careerInfo, quizInfo);
}

private record CareerInfoResponse(
Expand Down

0 comments on commit 6ac7e7e

Please sign in to comment.