webcompile/src/routes/blog/+page.server.ts

11 lines
222 B
TypeScript
Raw Normal View History

import type { PageServerLoad } from "./$types";
2023-01-01 04:51:53 +05:30
import fetchApi from "$lib/ghost";
2023-01-01 04:51:53 +05:30
export const load = (async () => {
const data = await fetchApi("posts");
2023-01-01 04:51:53 +05:30
return {
posts: data.posts
};
}) satisfies PageServerLoad;