Skip to content

Commit

Permalink
refactor : 소셜로그인 반영으로 인한 일부 로직 수정 (vo)
Browse files Browse the repository at this point in the history
  • Loading branch information
HandmadeCloud committed Jan 15, 2024
1 parent cb7250e commit 72c5c72
Showing 1 changed file with 8 additions and 5 deletions.
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
);
}
}

0 comments on commit 72c5c72

Please sign in to comment.