Skip to content

Commit 436e8f4

Browse files
committed
fix: 회원가입 이메일 전송 시 이메일 존재 여부 확인 로직 추가
1 parent b8b72c4 commit 436e8f4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/java/com/back/web7_9_codecrete_be/domain/auth/service/AuthService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ public LoginResponse login(LoginRequest req) {
8585

8686
// 이메일 인증코드 전송
8787
public void sendVerificationCode(String email) {
88+
if (userRepository.existsByEmail(email)) {
89+
throw new BusinessException(AuthErrorCode.EMAIL_DUPLICATED);
90+
}
8891
emailService.createAndSendVerificationCode(email);
8992
}
9093

0 commit comments

Comments
 (0)