From b3d70b0259d82864bf35906e8deb43130935889b Mon Sep 17 00:00:00 2001 From: an2n Date: Thu, 30 Jan 2025 16:43:07 +0100 Subject: [PATCH] Chore/calendar method (#189) Co-authored-by: Anton Lilleby --- app/src/routes/api/subscribe/+server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/routes/api/subscribe/+server.ts b/app/src/routes/api/subscribe/+server.ts index 7fb6ceb..f21e733 100644 --- a/app/src/routes/api/subscribe/+server.ts +++ b/app/src/routes/api/subscribe/+server.ts @@ -6,7 +6,7 @@ import ical, { ICalCalendarMethod, type ICalEventData } from "ical-generator"; export const GET: RequestHandler = async () => { try { const events = await getFutureEvents(); - const calendar = ical({ name: "Skjer", method: ICalCalendarMethod.PUBLISH }); + const calendar = ical({ name: "Skjer", method: ICalCalendarMethod.REQUEST }); events.forEach( ({ _id: id, title: summary, summary: description, start, end, place: location }) => { @@ -24,7 +24,7 @@ export const GET: RequestHandler = async () => { } ); - const icalFeed = Buffer.from(calendar.toString()); + const icalFeed = calendar.toString(); return new Response(icalFeed, { headers: {