M1_ProjetWeb/src/hooks.server.ts

7 lines
197 B
TypeScript
Raw Normal View History

import type { Handle } from '@sveltejs/kit';
export const handle: Handle = async ({ event, resolve }) => {
event.locals.token = await event.cookies.get('token');
return await resolve(event);
};