mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
13 lines
348 B
TypeScript
13 lines
348 B
TypeScript
import { loadFlash } from 'sveltekit-flash-message/server';
|
|
import type { LayoutServerLoad } from './$types';
|
|
import { redirect } from '@sveltejs/kit';
|
|
|
|
export const load: LayoutServerLoad = loadFlash(async (event) => {
|
|
const { locals, url } = event;
|
|
const { user } = await locals.getAuthedUser();
|
|
|
|
return {
|
|
url: url.pathname,
|
|
user,
|
|
};
|
|
});
|