removed cacheAccesDefinition as a parameter
This commit is contained in:
parent
5b6fe52a04
commit
920a34920e
@ -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<CacheAccesDefinition> 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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user