getAllPresets

main
Said Gedik 2023-10-10 13:42:34 +02:00
parent fa51b78eec
commit 0ccfb5e51c
2 changed files with 22 additions and 12 deletions

View File

@ -299,14 +299,6 @@ public class KalenderRestController {
return implementer.get(request);
}
@CrossOrigin("*")
@GetMapping("api/initPresets")
@ResponseBody
public Object initPresets() throws ARException, NotFoundError {
Presets presets = new Presets(javaAPI);
return presets.initPresets();
}
@CrossOrigin("*")
@PostMapping("/api/savePreset")
@ResponseBody
@ -321,11 +313,28 @@ public class KalenderRestController {
// @CrossOrigin("*")
// @PostMapping("/api/selectPreset")
// @ResponseBody
// public boolean selectPreset(@RequestBody String guid) throws ARException, NotFoundError {
// Presets presets = new Presets(javaAPI);
// return presets.selectPreset(guid);
// public boolean selectPreset(@RequestBody String guid) throws ARException,
// NotFoundError {
// Presets presets = new Presets(javaAPI);
// return presets.selectPreset(guid);
// }
@CrossOrigin("*")
@GetMapping("api/updatePresets")
@ResponseBody
public Object initPresets() throws ARException, NotFoundError {
Presets presets = new Presets(javaAPI);
return presets.initPresets();
}
@CrossOrigin("*")
@GetMapping("/api/getAllPresets")
@ResponseBody
public List<Preset> savePreset() throws NotFoundError, ARException {
Presets presets = new Presets(javaAPI);
return presets.getAll();
}
/**
* Logs the received request with the endpoint and request body.
*

View File

@ -109,7 +109,8 @@ public class Presets {
}
}
public List<Preset> getAll() {
public List<Preset> getAll() throws NotFoundError, ARException {
allPresets();
return this.presets;
}
}