Skip to content

Commit

Permalink
fix: non social로 회원가입시 모든 회원 이메일 중복 검사
Browse files Browse the repository at this point in the history
  • Loading branch information
goathoon committed Oct 11, 2023
1 parent 9db0be2 commit 86c5c5f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.io.IOException;
import java.util.Optional;
import java.util.UUID;
Expand Down Expand Up @@ -133,7 +132,7 @@ public ValidatedDto isValidName(String username) {
}
public ValidatedDto isValidEmail(String email){

boolean isEmailAvailable = memberRepository.findNonSocialMemberByEmail(email).isEmpty();
boolean isEmailAvailable = memberRepository.findNonSocialMemberByEmail(email).isEmpty() && memberRepository.findSocialMemberByEmail(email).isEmpty();
String message = isEmailAvailable ? "사용 가능한 이메일입니다." : "이미 사용 중인 이메일입니다.";
return new ValidatedDto(isEmailAvailable,message);
}
Expand Down

0 comments on commit 86c5c5f

Please sign in to comment.