File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed
java/life/mosu/mosuserver
application/auth/processor Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,10 @@ private void validateForNewSignUp(UserJpaEntity user) {
3030
3131 userRepository .findByPhoneNumber (user .getOriginPhoneNumber ())
3232 .ifPresent (existingUser -> {
33- if (existingUser .isPendingUser ()) {
34- switch (existingUser .getProvider ()) {
35- case MOSU :
36- throw new CustomRuntimeException (ErrorCode .USER_ALREADY_EXISTS );
37- case KAKAO :
38- throw new CustomRuntimeException (ErrorCode .KAKAO_DUPLICATED );
39- }
33+ if (existingUser .isKakaoUser ()) {
34+ throw new CustomRuntimeException (ErrorCode .KAKAO_DUPLICATED );
35+ } else if (existingUser .isPendingUser () && existingUser .isMosuUser ()) {
36+ throw new CustomRuntimeException (ErrorCode .USER_ALREADY_EXISTS );
4037 }
4138 });
4239
Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ public void updateUserInfo(
112112 public boolean isMosuUser () {
113113 return this .provider .equals (AuthProvider .MOSU );
114114 }
115+
116+ public boolean isKakaoUser () {
117+ return this .provider .equals (AuthProvider .KAKAO );
118+ }
115119
116120 public boolean isPendingUser () {
117121 return this .userRole .equals (UserRole .ROLE_PENDING );
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ server:
1010 include-stacktrace : never
1111
1212spring :
13+ threads :
14+ virtual :
15+ enabled : true
16+
1317 config :
1418 import :
1519 - optional:file:.env[.properties]
You can’t perform that action at this time.
0 commit comments