Improve formatting
This commit is contained in:
@ -2,8 +2,8 @@ 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;
|
||||
const p = await fetch('/');
|
||||
return {
|
||||
posts: (await p.json()) as Post[]
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
|
@ -2,4 +2,4 @@ import type { RequestHandler } from './$types';
|
||||
|
||||
export const GET = (async ({ fetch }) => {
|
||||
return await fetch('api/posts');
|
||||
}) satisfies RequestHandler;
|
||||
}) satisfies RequestHandler;
|
||||
|
@ -13,4 +13,4 @@ export const GET = (async ({ url }) => {
|
||||
count = Math.min(count, 100);
|
||||
const posts = await getPosts(since, before, count);
|
||||
return json(posts);
|
||||
}) satisfies RequestHandler;
|
||||
}) satisfies RequestHandler;
|
||||
|
Reference in New Issue
Block a user