Files
classquiz-ai/frontend/src/routes/+page.server.ts
T

17 lines
349 B
TypeScript

// SPDX-FileCopyrightText: 2023 Marlon W (Mawoka)
//
// SPDX-License-Identifier: MPL-2.0
import { redirect } from '@sveltejs/kit';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async ({ parent }) => {
const { email } = await parent();
if (email) {
redirect(302, '/dashboard');
}
return {
email
};
};