lab-2 some minor fixes
This commit is contained in:
parent
fa7769e888
commit
01d55b7611
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user