forked from ProjectSegfault/website
11 lines
267 B
TypeScript
11 lines
267 B
TypeScript
import type { PageServerLoad } from "./$types";
|
|
import { env } from "$env/dynamic/private";
|
|
|
|
export const load: PageServerLoad = async () => {
|
|
return {
|
|
posts: await fetch(env.VITE_API_URL + "/api/v1/blog").then(
|
|
(res) => res.json()
|
|
).catch(() => ({}))
|
|
};
|
|
};
|