Files
moshing-mammut/src/routes/+page.ts
2023-04-11 16:02:54 +02:00

10 lines
246 B
TypeScript

import type { Post } from '$lib/mastodon/response';
import type { PageLoad } from './$types';
export const load = (async ({ fetch }) => {
const p = await fetch('/');
return {
posts: (await p.json()) as Post[]
};
}) satisfies PageLoad;