Skip to content

Commit

Permalink
Merge pull request #62 from 0702Yoon/main
Browse files Browse the repository at this point in the history
안되던 회원가입 중복 체크 수정
  • Loading branch information
0702Yoon authored Aug 13, 2024
2 parents 164d874 + 0d2f2bf commit f359c89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.example.bigbrotherbe.domain.member.service;

import static com.example.bigbrotherbe.global.email.EmailConfig.AUTH_CODE_PREFIX;

import com.example.bigbrotherbe.domain.member.dto.request.SignUpDto;
import com.example.bigbrotherbe.domain.member.dto.response.MemberInfoResponse;
Expand Down Expand Up @@ -55,8 +54,7 @@ public class MemberServiceImpl implements MemberService {
// @Value("${spring.mail.auth-code-expiration-millis}")
private final long authCodeExpirationMillis = 1800000;


@Transactional
@Transactional(rollbackFor = Exception.class)
@Override
public MemberResponse userSignUp(SignUpDto signUpDto) {
memberChecker.checkExistUserEmail(signUpDto.getEmail());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class MemberChecker {
private final MemberRepository memberRepository;

public void checkExistUserEmail(String email) {
if (memberRepository.existsByUsername(email)) {
if (memberRepository.findByEmail(email).isPresent()) {
throw new BusinessException(ErrorCode.EXIST_EMAIL);
}
}
Expand Down

0 comments on commit f359c89

Please sign in to comment.