From f3039248938abf183c459d82bb8df80d94d8a29e Mon Sep 17 00:00:00 2001 From: Fenris Wolf Date: Thu, 26 Sep 2024 10:33:57 +0200 Subject: [PATCH] [mod] backend --- source/logic/backend.ts | 44 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/source/logic/backend.ts b/source/logic/backend.ts index 0cb6d72..ebf07c2 100644 --- a/source/logic/backend.ts +++ b/source/logic/backend.ts @@ -215,7 +215,49 @@ namespace _zeitbild.frontend_web.backend { return call( lib_plankton.http.enum_method.get, - "/calendars", + "/calendar", + null + ); + } + + + /** + */ + export async function calendar_event_add( + calendar_id : _zeitbild.frontend_web.type.calendar_id, + event_object : _zeitbild.frontend_web.type.event_object + ) : Promise + { + return call( + lib_plankton.http.enum_method.post, + lib_plankton.string.coin( + "/calendar/{{calendar_id}}/event", + { + "calendar_id": calendar_id, + } + ), + event_object + ); + } + + + /** + * @todo event id type + */ + export async function calendar_event_remove( + calendar_id : _zeitbild.frontend_web.type.calendar_id, + event_id : int + ) : Promise + { + return call( + lib_plankton.http.enum_method.delete, + lib_plankton.string.coin( + "/calendar/{{calendar_id}}/event/{{event_id}}", + { + "calendar_id": calendar_id, + "event_id": event_id, + } + ), null ); }