Lots of dev
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
import type { LayoutServerLoad } from './$types';
|
||||
import { getUserFromJWT } from '$lib/shared';
|
||||
|
||||
export const load: LayoutServerLoad = ({ cookies }) => {
|
||||
const jwt = cookies.get('jwt');
|
||||
if (jwt) {
|
||||
return { selfUser: getUserFromJWT(jwt) };
|
||||
}
|
||||
return { selfUser: null };
|
||||
export const load: LayoutServerLoad = async ({ locals }) => {
|
||||
return { user: locals.user };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user