Removed manual check of email #35
@ -17,9 +17,6 @@ public class UserService {
|
|||||||
if (appUserRepository.existsByUsername(username)) {
|
if (appUserRepository.existsByUsername(username)) {
|
||||||
throw new IllegalArgumentException("Username already exists");
|
throw new IllegalArgumentException("Username already exists");
|
||||||
}
|
}
|
||||||
if (appUserRepository.existsByEmail(email)) {
|
|
||||||
throw new IllegalArgumentException("Email already exists");
|
|
||||||
}
|
|
||||||
|
|
||||||
AppUser newUser = new AppUser(username, email, "USER");
|
AppUser newUser = new AppUser(username, email, "USER");
|
||||||
appUserRepository.save(newUser);
|
appUserRepository.save(newUser);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user