Files
SvelteKitSaasBoilerplate/src/routes/+layout.server.ts
T
2024-07-04 19:27:52 +01:00

12 lines
258 B
TypeScript

import type { LayoutServerLoad } from './$types';
export const load: LayoutServerLoad = async ({ locals: { safeGetSession }, cookies }) => {
const { session, user } = await safeGetSession();
return {
session,
user,
cookies: cookies.getAll()
};
};