mirror of
https://github.com/ProjectSegfault/website.git
synced 2025-04-12 13:59:10 +05:30
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(() => ({}))
|
|
};
|
|
};
|