Removed manual check of email

New users would never be able to login because of the manual checking of email.
This has happened since the requirements and code has changed over time and we
missed the manual constraint.

This is related to the fix where we removed the database constraint.
This commit is contained in:
Nico Athanassiadis 2025-03-31 13:33:35 +02:00
parent 35b1a306e1
commit 316ca7c042

@ -17,9 +17,6 @@ public class UserService {
if (appUserRepository.existsByUsername(username)) {
throw new IllegalArgumentException("Username already exists");
}
if (appUserRepository.existsByEmail(email)) {
throw new IllegalArgumentException("Email already exists");
}
AppUser newUser = new AppUser(username, email, "USER");
appUserRepository.save(newUser);