🐛 Fixed more errors coming from upgrading SvelteKit
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import { signedIn } from '$lib/stores';
|
||||
|
||||
export async function load({ session }) {
|
||||
if (!session.authenticated) {
|
||||
export async function load({ parent }) {
|
||||
const { email } = await parent();
|
||||
if (!email) {
|
||||
throw redirect(302, '/account/login?returnTo=/create');
|
||||
}
|
||||
if (session.authenticated) {
|
||||
signedIn.set(true);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
Reference in New Issue
Block a user