Leaderboard: Fetch points data
This commit is contained in:
12
src/routes/leaderboard/+page.ts
Normal file
12
src/routes/leaderboard/+page.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { fetch_users, fetch_racepickpoints, fetch_racepickpointsacc } from "$lib/fetch";
|
||||
import type { PageLoad } from "../$types";
|
||||
|
||||
export const load: PageLoad = async ({ fetch, depends }) => {
|
||||
depends("data:users", "data:raceresults");
|
||||
|
||||
return {
|
||||
users: fetch_users(fetch),
|
||||
racepickpoints: fetch_racepickpoints(fetch),
|
||||
racepickpointsacc: fetch_racepickpointsacc(fetch),
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user