blob: c4079a2f7c632f20bf7c76dc2cb678ab1ad90b92 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
import { get } from '$lib/utils';
import { redirect } from '@sveltejs/kit';
export async function load({ parent }) {
let { user } = await parent();
if (!user) throw redirect(307, '/login');
let users = (await get('/users')).sort((a, b) => b.balance - a.balance);
return { users };
}
|