lab-2 some minor fixes

This commit is contained in:
Zakharov_Rostislav 2024-04-05 16:02:01 +04:00
parent fa7769e888
commit 01d55b7611

View File

@ -32,10 +32,8 @@ public class UserService {
}
public UserEntity create(UserEntity entity) {
if (entity.getRole() == null || !entity.getRole().equals("user")) {
entity.setRole("user");
}
entity.setBooks(new ArrayList<BookEntity>());
entity.setRole("user");
entity.setBooks(new ArrayList<>());
return repository.create(entity);
}