-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor : 소셜로그인 반영으로 인한 일부 로직 수정 (vo)
- Loading branch information
1 parent
cb7250e
commit 72c5c72
Showing
1 changed file
with
8 additions
and
5 deletions.
There are no files selected for viewing
13 changes: 8 additions & 5 deletions
13
...c/main/java/com/programmers/lime/domains/member/api/dto/response/MemberLoginResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
package com.programmers.lime.domains.member.api.dto.response; | ||
|
||
import com.programmers.lime.domains.member.application.dto.response.MemberLoginServiceResponse; | ||
import com.programmers.lime.domains.member.domain.Member; | ||
|
||
public record MemberLoginResponse( | ||
Long memberId, | ||
String nickname, | ||
String accessToken | ||
) { | ||
public static MemberLoginResponse from(final MemberLoginServiceResponse serviceResponse) { | ||
public static MemberLoginResponse from( | ||
final Member member, | ||
final String accessToken | ||
) { | ||
return new MemberLoginResponse( | ||
serviceResponse.memberId(), | ||
serviceResponse.nickname(), | ||
serviceResponse.accessToken() | ||
member.getId(), | ||
member.getNickname(), | ||
accessToken | ||
); | ||
} | ||
} |