import { getSolidDataset, getThingAll } from '@inrupt/solid-client'; import type { PageServerLoad } from './$types'; import { thingToTask } from '$lib/models/task'; export const load: PageServerLoad = async (event) => { const session = await event.locals.getSession(); const iri = 'https://pod.5ika.ch/tasks/default'; const dataset = await getSolidDataset(iri, { fetch: session.fetch }); const taskThings = getThingAll(dataset); const tasks = taskThings.map(thingToTask); return { tasks, iri }; };