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