diff --git a/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java b/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java index 25926d8..285eaf6 100644 --- a/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java +++ b/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java @@ -41,8 +41,7 @@ public class Controller { @RequestMapping("/startCache") public @ResponseBody String startCache(@RequestParam(value = "userID", defaultValue = "-1") String userID, - @RequestParam String cacheID, - @RequestParam String cacheAccesDefinitionID) { + @RequestParam String cacheID) { if (!userID.equals("-1")) { // ein angemeldeter User startet den Cache @@ -65,12 +64,12 @@ public class Controller { } Optional cacheAccesDefinitionOptional = - cacheAccesDefinitionRepository.findById(Integer.valueOf(cacheAccesDefinitionID)); + cacheAccesDefinitionRepository.findById(1); // bearbeitet if (cacheAccesDefinitionOptional.isPresent()) { CacheAccesDefinition cacheAccesDefinition = cacheAccesDefinitionOptional.get(); bearbeitet.setCacheAccesDefinition(cacheAccesDefinition); } else { - return "There is no cacheAccesDefinition with the ID " + cacheAccesDefinitionID; + return "There is no cacheAccesDefinition with the ID " + 1; } bearbeitetRepository.save(bearbeitet);