fix(web): sharing of access token in server API (#1858)

This commit is contained in:
Michel Heusschen
2023-02-24 21:42:20 +01:00
committed by GitHub
parent 3ea107be5a
commit cc6253ba38
14 changed files with 43 additions and 58 deletions

View File

@@ -1,8 +1,7 @@
import { redirect } from '@sveltejs/kit';
import { api } from '@api';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async ({ parent }) => {
export const load = (async ({ parent, locals: { api } }) => {
const { user } = await parent();
if (!user) {
@@ -19,4 +18,4 @@ export const load: PageServerLoad = async ({ parent }) => {
title: 'Server Status'
}
};
};
}) satisfies PageServerLoad;