import { getSolidDataset, getThingAll } from '@inrupt/solid-client'; import type { PageServerLoad } from './$types'; import { Task } 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((thing) => new Task(thing)).map((task) => task.serialize()); console.log(tasks); return { tasks }; };