Skip to content

Commit b7fc3d4

Browse files
committed
MOSU-352 fix: 카카오 중복 유저 업데이트 분기
1 parent 9daf01f commit b7fc3d4

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/main/java/life/mosu/mosuserver/application/oauth/OAuthUserPersistenceProcessor.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,8 @@ public UserJpaEntity process(final OAuthUserInfo info) {
2323
return userRepository.findByPhoneNumber(
2424
PhoneNumberUtil.formatPhoneNumber(info.phoneNumber()))
2525
.map(existingUser -> {
26-
switch (existingUser.getProvider()) {
27-
case MOSU:
28-
if (existingUser.isPendingUser()) {
29-
throw new OAuthException("DUPLICATE");
30-
}
31-
break;
32-
case KAKAO:
33-
if (existingUser.isPendingUser()) {
34-
throw new OAuthException("KAKAO_DUPLICATE");
35-
}
36-
break;
26+
if (existingUser.isMosuUser()) {
27+
throw new OAuthException("DUPLICATE");
3728
}
3829
existingUser.updateOAuthUser(
3930
info.gender(),

0 commit comments

Comments
 (0)