NCP-3
This commit is contained in:
@@ -38,8 +38,7 @@ public class AuthService {
|
||||
@Transactional
|
||||
public AuthToken register(RegisterRequest registerRequest) {
|
||||
if (userRepository.existsByEmail(registerRequest.email())) {
|
||||
throw new UserAlreadyExistsException(messageSource.getMessage("error.user.exists", null,
|
||||
Locale.getDefault()));
|
||||
throw new UserAlreadyExistsException("User already exists with email: " + registerRequest.email());
|
||||
}
|
||||
|
||||
User user = new User();
|
||||
|
||||
Reference in New Issue
Block a user