Support exporting calendar events

Also update Deno and libraries
This commit is contained in:
Bruno Bernardino
2024-03-25 15:50:15 +00:00
parent 5b3217cdfc
commit a788456751
10 changed files with 98 additions and 47 deletions

View File

@@ -118,7 +118,7 @@ export const handler: Handler<Data, FreshContextState> = async (request, context
const calendarEvents = await getCalendarEvents(context.state.user.id, [calendar.id]);
if (request.method === 'GET') {
const response = new Response(formatCalendarEventsToVCalendar(calendarEvents, calendar), {
const response = new Response(formatCalendarEventsToVCalendar(calendarEvents, [calendar]), {
status: 200,
});
@@ -172,7 +172,7 @@ export const handler: Handler<Data, FreshContextState> = async (request, context
if (includeVCalendar) {
parsedCalendarEvent['d:propstat'][0]['d:prop']['cal:calendar-data'] = escapeXml(
formatCalendarEventsToVCalendar([calendarEvent], calendar!),
formatCalendarEventsToVCalendar([calendarEvent], [calendar!]),
);
}