Skip to content

Commit

Permalink
feat: 사용 중인 전화번호 검증 로직 추가(#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
Minjae-An committed May 8, 2024
1 parent e4a6f37 commit 7ba5bcd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions be/src/main/java/yeonba/be/login/service/LoginService.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
import yeonba.be.login.dto.request.UserLoginRequest;
import yeonba.be.login.dto.request.UserRefreshJwtRequest;
import yeonba.be.login.dto.request.UserValidateUsedNicknameRequest;
import yeonba.be.login.dto.request.UserValidateUsedPhoneNumberRequest;
import yeonba.be.login.dto.response.UserLoginResponse;
import yeonba.be.login.dto.response.UserRefrehJwtResponse;
import yeonba.be.login.dto.response.UserValidateUsedNicknameResponse;
import yeonba.be.login.dto.response.UserValidateUsedPhoneNumberResponse;
import yeonba.be.user.entity.User;
import yeonba.be.user.enums.LoginType;
import yeonba.be.user.repository.user.UserQuery;
Expand Down Expand Up @@ -74,4 +76,13 @@ public UserValidateUsedNicknameResponse validateUsedNickname(

return new UserValidateUsedNicknameResponse(usedNickname);
}

@Transactional(readOnly = true)
public UserValidateUsedPhoneNumberResponse validateUsedPhoneNumber(
UserValidateUsedPhoneNumberRequest request) {

boolean usedPhoneNumber = userQuery.validateUsedPhoneNumber(request.getPhoneNumber());

return new UserValidateUsedPhoneNumberResponse(usedPhoneNumber);
}
}

0 comments on commit 7ba5bcd

Please sign in to comment.