-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Weekly/11/Refactor/TokenResponse] token response에 사용자 아이디, 타입 반환하도록 …
…반영 (#139)
- Loading branch information
Showing
4 changed files
with
21 additions
and
7 deletions.
There are no files selected for viewing
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
3 changes: 2 additions & 1 deletion
3
src/main/java/org/ktc2/cokaen/wouldyouin/auth/api/dto/SocialTokenResponse.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,8 +1,9 @@ | ||
package org.ktc2.cokaen.wouldyouin.auth.api.dto; | ||
|
||
import lombok.Builder; | ||
import org.ktc2.cokaen.wouldyouin.member.persist.MemberType; | ||
|
||
@Builder | ||
public record SocialTokenResponse(Boolean isWelcomeMember, String token) { | ||
public record SocialTokenResponse(Boolean isWelcomeMember, String token, Long memberId, MemberType memberType) { | ||
|
||
} |
7 changes: 5 additions & 2 deletions
7
src/main/java/org/ktc2/cokaen/wouldyouin/auth/api/dto/TokenResponse.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,13 +1,16 @@ | ||
package org.ktc2.cokaen.wouldyouin.auth.api.dto; | ||
|
||
import lombok.Builder; | ||
import org.ktc2.cokaen.wouldyouin.member.persist.MemberType; | ||
|
||
@Builder | ||
public record TokenResponse(String token) { | ||
public record TokenResponse(String token, Long memberId, MemberType memberType) { | ||
|
||
public static TokenResponse from(String token) { | ||
public static TokenResponse of(String token, Long memberId, MemberType memberType) { | ||
return TokenResponse.builder() | ||
.token(token) | ||
.memberId(memberId) | ||
.memberType(memberType) | ||
.build(); | ||
} | ||
} |
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