user displayed in navbar with option to logout
This commit is contained in:
11
src/routes/(rezepte)/rezepte/+layout.server.ts
Normal file
11
src/routes/(rezepte)/rezepte/+layout.server.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import type {LayoutServerLoad} from './$types';
|
||||
import { authenticateUser } from '$lib/js/authenticate';;
|
||||
|
||||
export const load = (async ({cookies}) => {
|
||||
const user = await authenticateUser(cookies)
|
||||
console.log("LOAD LAYOUT")
|
||||
console.log(user)
|
||||
return {
|
||||
user
|
||||
}
|
||||
}) satisfies LayoutServerLoad;
|
Reference in New Issue
Block a user