more bugfixes
This commit is contained in:
parent
5e10ffbe1b
commit
e81338dd38
@ -516,6 +516,18 @@ public class Controller {
|
||||
|
||||
Team team = (Team) getTeam.getBody();
|
||||
|
||||
int i = 0;
|
||||
|
||||
for (User_Info userInfo1 : user_infoRepository.findAll()) {
|
||||
if (userInfo1.getTeam().equals(team)) {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
if (i >= 10) {
|
||||
return ResponseEntity.status(400).body("The team already has 10 members");
|
||||
}
|
||||
|
||||
user_info.setTeam(team);
|
||||
|
||||
user_infoRepository.save(user_info);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user