Merge branch 'develop' into frontend/robin
This commit is contained in:
commit
ab7f3de3f9
@ -109,13 +109,13 @@ module.exports = function (ctx) {
|
||||
},
|
||||
env: ctx.dev
|
||||
? { // Base URL for API-Calls: DEV
|
||||
API: JSON.stringify('http://localhost:8080'),
|
||||
//API: JSON.stringify('https://seserver.se.hs-heilbronn.de:9443/buga19geocaching'),
|
||||
//API: JSON.stringify('http://localhost:8080'),
|
||||
API: JSON.stringify('https://seserver.se.hs-heilbronn.de:9443/buga19geocaching'),
|
||||
USER_API: JSON.stringify('https://seserver.se.hs-heilbronn.de:9443/buga19usermanagement')
|
||||
}
|
||||
: { // Base URL for API-Calls: PRODUCTION (build)
|
||||
API: JSON.stringify('http://localhost:8080'),
|
||||
//API: JSON.stringify('https://seserver.se.hs-heilbronn.de:9443/buga19geocaching'),
|
||||
//API: JSON.stringify('http://localhost:8080'),
|
||||
API: JSON.stringify('https://seserver.se.hs-heilbronn.de:9443/buga19geocaching'),
|
||||
USER_API: JSON.stringify('https://seserver.se.hs-heilbronn.de:9443/buga19usermanagement')
|
||||
}
|
||||
},
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package hhn.labsw.bugageocaching.controller;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.mashape.unirest.http.exceptions.UnirestException;
|
||||
import hhn.labsw.bugageocaching.entities.*;
|
||||
import hhn.labsw.bugageocaching.helper.POI;
|
||||
import hhn.labsw.bugageocaching.helper.RankingListHelper;
|
||||
@ -603,14 +602,15 @@ public class Controller {
|
||||
int i = 0;
|
||||
|
||||
// zählt teammitglieder
|
||||
for (User_Info userInfo1 : user_infoRepository.findAll()) {
|
||||
List<User_Info> user_infos = user_infoRepository.findByTeam(team);
|
||||
/*for (User_Info userInfo1 : user_infoRepository.findAll()) {
|
||||
if (userInfo1.getTeam().equals(team)) {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// wenn maximalanzahl der teammitglieder erreicht...
|
||||
if (i >= 10) {
|
||||
if (user_infos.size() >= 10) {
|
||||
return ResponseEntity.status(400).body("The team already has 10 members");
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package hhn.labsw.bugageocaching.repositories;
|
||||
|
||||
import hhn.labsw.bugageocaching.entities.Team;
|
||||
import hhn.labsw.bugageocaching.entities.User;
|
||||
import hhn.labsw.bugageocaching.entities.User_Info;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
@ -10,4 +11,5 @@ import java.util.Optional;
|
||||
|
||||
public interface User_InfoRepository extends CrudRepository<User_Info, Integer> {
|
||||
User_Info findUser_InfoByUser(User user);
|
||||
List<User_Info> findByTeam(Team team);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user