13 lines
227 B
TypeScript
13 lines
227 B
TypeScript
import { redirect } from '@sveltejs/kit';
|
|
|
|
export const load = async ({ parent }) => {
|
|
const { email } = await parent();
|
|
|
|
if (!email) {
|
|
throw redirect(302, '/account/login?returnTo=/dashboard');
|
|
}
|
|
return {
|
|
email
|
|
};
|
|
};
|