mirror of
https://github.com/ProjectSegfault/website.git
synced 2025-05-31 14:12:04 +05:30
migrate to segfaultapi
This commit is contained in:
8
src/routes/+page.server.ts
Normal file
8
src/routes/+page.server.ts
Normal file
@ -0,0 +1,8 @@
|
||||
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())
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user