website/src/routes/blog/authors/+page.server.ts

16 lines
292 B
TypeScript
Raw Normal View History

import type { PageServerLoad } from "./$types";
2023-01-25 22:41:11 +05:30
import fetchGhost from "../fetchGhost";
2023-01-25 22:41:11 +05:30
export const load = (async ({ fetch }) => {
const data = await fetchGhost("authors");
const meta = {
title: "Blog authors"
2023-02-03 23:25:33 +05:30
};
2023-01-01 04:51:53 +05:30
return {
2023-01-25 22:41:11 +05:30
authors: data,
...meta
2023-01-01 04:51:53 +05:30
};
2023-01-25 22:41:11 +05:30
}) satisfies PageServerLoad;