diff --git a/Match-Api/src/main/java/com/example/matchapi/user/controller/AuthController.java b/Match-Api/src/main/java/com/example/matchapi/user/controller/AuthController.java index 42537a65..4f18ce02 100644 --- a/Match-Api/src/main/java/com/example/matchapi/user/controller/AuthController.java +++ b/Match-Api/src/main/java/com/example/matchapi/user/controller/AuthController.java @@ -90,7 +90,6 @@ CommonResponse getNaverAddress(@RequestBody UserReq.SocialLogin @DisableSecurity public CommonResponse checkSms(@RequestBody @Valid UserReq.Sms sms){ log.info("01-04 비회원 문자인증 = " +sms.getPhone()); - if(sms.getPhone().equals("01011111111")) return CommonResponse.onSuccess(new UserRes.Sms("111111")); String number = smsHelper.sendSms(sms.getPhone()); return CommonResponse.onSuccess(new UserRes.Sms(number)); } @@ -109,7 +108,6 @@ public CommonResponse signUpUser(@RequestBody @Valid UserReq. @PostMapping(value="/email") @DisableSecurity public CommonResponse checkUserEmail(@RequestBody @Valid UserReq.UserEmail userEmail){ - if(userEmail.getEmail().equals("test1234@gmail.com")) return CommonResponse.onSuccess("이메일 사용 가능"); log.info("01-05-01 유저 회원가입 이메일 검증"+userEmail.getEmail()); authService.checkUserEmail(userEmail); return CommonResponse.onSuccess("이메일 사용 가능"); @@ -121,7 +119,6 @@ public CommonResponse checkUserEmail(@RequestBody @Valid UserReq.UserEma @DisableSecurity public CommonResponse checkUserPhone(@RequestBody @Valid UserReq.UserPhone userPhone){ log.info("01-05-01 유저 회원가입 전화번호 검증"+userPhone.getPhone()); - if(userPhone.getPhone().equals("01011111111")) return CommonResponse.onSuccess("핸드폰 사용가능"); authService.checkUserPhone(userPhone); return CommonResponse.onSuccess("핸드폰 사용가능"); } @@ -141,7 +138,6 @@ public CommonResponse logIn(@RequestBody @Valid UserReq.LogIn @GetMapping("/email") @DisableSecurity public CommonResponse emailAuth(@RequestParam String email){ - if(email.equals("test1234@gmail.com")) return CommonResponse.onSuccess("이메일 사용 가능"); authService.sendEmailMessage(email); return CommonResponse.onSuccess("메일 전송 성공"); } @@ -151,8 +147,6 @@ public CommonResponse emailAuth(@RequestParam String email){ @ApiErrorCodeExample(CodeAuthErrorCode.class) @DisableSecurity public CommonResponse checkEmailAuth(@RequestBody UserReq.UserEmailAuth email){ - if(email.getEmail().equals("test1234@gmail.com"))return CommonResponse.onSuccess("메일 인증 성공"); - authService.checkUserEmailAuth(email); return CommonResponse.onSuccess("메일 인증 성공"); } @@ -172,8 +166,6 @@ public CommonResponse checkPhone(@RequestParam String phone){ @ApiErrorCodeExample(CodeAuthErrorCode.class) @DisableSecurity public CommonResponse checkEmailAuth(@RequestBody UserReq.UserPhoneAuth phone){ - if(phone.getPhone().equals("01011111111")) return CommonResponse.onSuccess("핸드폰 인증 성공"); - authService.checkPhoneAuth(phone); return CommonResponse.onSuccess("핸드폰 인증 성공"); } @@ -200,7 +192,6 @@ public CommonResponse appleSignUp(@RequestBody @Valid UserReq @ApiErrorCodeExample({UserSignUpErrorCode.class, SendEmailFindPassword.class}) @DisableSecurity public CommonResponse sendEmailPasswordFind(@RequestParam String email){ - if(email.equals("test1234@gmail.com")) return CommonResponse.onSuccess("이메일 사용 가능"); authService.sendEmailPasswordFind(email); return CommonResponse.onSuccess("메일 인증 성공"); } diff --git a/Match-Api/src/main/java/com/example/matchapi/user/converter/UserConverter.java b/Match-Api/src/main/java/com/example/matchapi/user/converter/UserConverter.java index 8582cd73..d12db38a 100644 --- a/Match-Api/src/main/java/com/example/matchapi/user/converter/UserConverter.java +++ b/Match-Api/src/main/java/com/example/matchapi/user/converter/UserConverter.java @@ -58,7 +58,7 @@ public User convertToKakaoSignUpUser(KakaoUserInfoDto kakaoUserInfoDto, SocialTy .birth(authHelper.birthConversion(kakaoUserInfoDto.getBirthYear(), kakaoUserInfoDto.getBirthDay())) .gender(authHelper.genderConversion(kakaoUserInfoDto.getGender())) .role(AuthorityEnum.ROLE_USER.getValue()) - .nickname(userHelper.createRandomNickName()) + .nickname(kakaoUserInfoDto.getName()) .serviceAlarm(ACTIVE) .eventAlarm(ACTIVE) .build(); @@ -87,7 +87,7 @@ public User convertToNaverSignUpUser(NaverUserInfoDto naverUserInfoDto, SocialTy .birth(authHelper.birthConversion(naverUserInfoDto.getBirthyear(), naverUserInfoDto.getBirthday())) .gender(authHelper.genderConversion(naverUserInfoDto.getGender())) .role(AuthorityEnum.ROLE_USER.getValue()) - .nickname(userHelper.createRandomNickName()) + .nickname(naverUserInfoDto.getName()) .serviceAlarm(ACTIVE) .eventAlarm(ACTIVE) .build(); @@ -105,7 +105,7 @@ public User convertToSignUpUser(UserReq.SignUpUser signUpUser) { .birth(authHelper.birthConversionToLocalDate(signUpUser.getBirthDate())) .gender(signUpUser.getGender()) .role(AuthorityEnum.ROLE_USER.getValue()) - .nickname(userHelper.createRandomNickName()) + .nickname(signUpUser.getName()) .serviceAlarm(ACTIVE) .eventAlarm(ACTIVE) .build(); @@ -243,7 +243,7 @@ public User convertToAppleUserSignUp(UserReq.@Valid AppleSignUp appleSignUp) { .socialId(appleSignUp.getSocialId()) .socialType(SocialType.APPLE) .role(AuthorityEnum.ROLE_USER.getValue()) - .nickname(userHelper.createRandomNickName()) + .nickname(appleSignUp.getName()) .serviceAlarm(ACTIVE) .eventAlarm(ACTIVE) .gender(appleSignUp.getGender())