atmo.rsvp
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #8 from flo-bit/feat/atmosphere-conf-vods

fix build

authored by

Florian and committed by
GitHub
58e3f238 7a8ab2fb

+5 -4
+5 -4
src/routes/(app)/p/[actor]/calendar.ics/+server.ts
··· 3 3 import { generateICalFeed, type ICalEvent } from '$lib/cal/ical'; 4 4 import { isActorIdentifier, type ActorIdentifier } from '@atcute/lexicons/syntax'; 5 5 import { 6 - contrail, 7 6 flattenEventRecord, 8 7 flattenEventRecords, 8 + getServerClient, 9 9 listEventRecordsFromContrail 10 10 } from '$lib/contrail'; 11 11 12 - export async function GET({ params }) { 12 + export async function GET({ params, platform }) { 13 13 if (!isActorIdentifier(params.actor)) { 14 14 throw error(404, 'Not found'); 15 15 } ··· 21 21 } 22 22 23 23 try { 24 + const client = getServerClient(platform!.env.DB); 24 25 const now = new Date().toISOString(); 25 26 26 27 const actorId = did as ActorIdentifier; 27 28 const [rsvpResponse, hostingResponse] = await Promise.all([ 28 - contrail.get('community.lexicon.calendar.rsvp.listRecords', { 29 + client.get('community.lexicon.calendar.rsvp.listRecords', { 29 30 params: { actor: actorId, hydrateEvent: true, limit: 100 } 30 31 }), 31 - listEventRecordsFromContrail({ 32 + listEventRecordsFromContrail(client, { 32 33 actor: actorId, 33 34 startsAtMin: now, 34 35 sort: 'startsAt',