mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
21 lines
502 B
TypeScript
21 lines
502 B
TypeScript
import { notSignedInMessage } from '$lib/flashMessages';
|
|
import { redirect } from 'sveltekit-flash-message/server';
|
|
import type { PageServerLoad } from './$types';
|
|
|
|
export const load: PageServerLoad = async (event) => {
|
|
const { locals } = event;
|
|
|
|
const authedUser = await locals.getAuthedUser();
|
|
if (!authedUser) {
|
|
throw redirect(302, '/login', notSignedInMessage, event);
|
|
}
|
|
|
|
// const users = await db.query.users.findMany({
|
|
// limit: 10,
|
|
// offset: 0,
|
|
// });
|
|
|
|
return {
|
|
// users,
|
|
};
|
|
};
|