From de1dcf7673c04d40011ec9ec265ccf53de990a14 Mon Sep 17 00:00:00 2001 From: Marc Beyer Date: Thu, 13 Jan 2022 17:32:58 +0100 Subject: [PATCH] Added edit-endpoint --- .../vpr/server/controller/EventController.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/com/vpr/server/controller/EventController.java b/server/src/main/java/com/vpr/server/controller/EventController.java index 158f84c..c642393 100644 --- a/server/src/main/java/com/vpr/server/controller/EventController.java +++ b/server/src/main/java/com/vpr/server/controller/EventController.java @@ -102,7 +102,7 @@ public class EventController { @PostMapping(path = "/del") public @ResponseBody - String addEvent(@RequestParam Integer eventId) { + String delEvent(@RequestParam Integer eventId) { eventRepository.deleteUserEventsById(Long.valueOf(eventId)); eventRepository.deleteById(Long.valueOf(eventId)); return "Deleted"; @@ -114,4 +114,18 @@ public class EventController { return eventRepository.findAllVisibleByUserId(userId); } + @PostMapping(path = "/edit") + public @ResponseBody + String editEvent( + @RequestParam Integer userId, + @RequestParam String date, + @RequestParam String name, + @RequestParam String start, + @RequestParam String end, + @RequestParam Integer prority, + @RequestParam Boolean isFullDay, + @RequestParam Boolean isPrivate + ) { + return ""; + } }