fix initial load 401 error

This commit is contained in:
2025-06-09 18:51:02 +02:00
parent 47de9dd35c
commit 6b562b58d1

View File

@@ -4,7 +4,9 @@ import { AUTH_COOIKIE_NAME } from '$lib/auth';
import type { PageServerLoad } from './$types';
import type { IMessage } from '$lib/message.svelte';
export const load: PageServerLoad = async ({ fetch, cookies }) => {
export const load: PageServerLoad = async ({ fetch, cookies, parent }) => {
await parent();
const authToken = cookies.get(AUTH_COOIKIE_NAME);
if (!authToken) {