fix initial load 401 error
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user