10 lines
246 B
TypeScript
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;
|