[mod] backend

This commit is contained in:
Fenris Wolf 2024-09-26 10:33:57 +02:00
parent 57f359e594
commit f303924893

View file

@ -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<void>
{
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<void>
{
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
);
}