Functionality done
This commit is contained in:
@ -41,4 +41,15 @@ public class GroupService {
|
||||
public Optional<Groups> getGroupById(Long id) {
|
||||
return this.repo.findById(id);
|
||||
}
|
||||
|
||||
public Long findNotExistingGroup(List<Long> ids) {
|
||||
Long response = Long.MIN_VALUE;
|
||||
for (Long oneId : ids) {
|
||||
if (this.repo.existsById(oneId) == false) {
|
||||
response = oneId;
|
||||
}
|
||||
}
|
||||
return response;
|
||||
|
||||
}
|
||||
}
|
@ -49,4 +49,8 @@ public class UserService {
|
||||
return this.repo.searchForUsers(query, UserRoles.STUDENT);
|
||||
}
|
||||
|
||||
public Optional<User> getById(Long userId) {
|
||||
return this.repo.findById(userId);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user