Skip to content

Commit

Permalink
Chore/calendar method (#189)
Browse files Browse the repository at this point in the history
Co-authored-by: Anton Lilleby <[email protected]>
  • Loading branch information
an2n and Anton Lilleby authored Jan 30, 2025
1 parent bf03823 commit b3d70b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/routes/api/subscribe/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand All @@ -24,7 +24,7 @@ export const GET: RequestHandler = async () => {
}
);

const icalFeed = Buffer.from(calendar.toString());
const icalFeed = calendar.toString();

return new Response(icalFeed, {
headers: {
Expand Down

1 comment on commit b3d70b0

@vercel
Copy link

@vercel vercel bot commented on b3d70b0 Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.