Skip to content

Commit

Permalink
[Feat] :: user not found exception add
Browse files Browse the repository at this point in the history
  • Loading branch information
lgwk42 committed May 11, 2024
1 parent 320cf49 commit 6a3c94c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public void adminSignUp(SignUpRequest request) {

@Override
public JsonWebTokenResponse signIn(SignInRequest request) {
if(userRepository.findByEmail(request.getEmail()).isEmpty())
throw UserNotFoundException.EXCEPTION;
String adminPassword = userRepository.getByEmail(request.getEmail()).getPassword();
if (!encoder.matches(request.getPassword(), adminPassword))
throw PasswordWrongException.EXCEPTION;
Expand Down

0 comments on commit 6a3c94c

Please sign in to comment.