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

8 lines
346 B
TypeScript
Raw Normal View History

2022-11-10 00:12:34 +05:30
import type { PageServerLoad } from "./$types";
export const load: PageServerLoad = async () => {
return {
state: await fetch("https://api.projectsegfau.lt/api/v1/state/announcements").then((res) => res.json()),
announcements: await fetch("https://api.projectsegfau.lt/api/v1/announcements").then((res) => res.json())
}
}