⬆️ Upgraded SvelteKit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import { signedIn } from '$lib/stores';
|
||||
export async function load({ session }) {
|
||||
if (!session.authenticated) {
|
||||
throw redirect(302, '/account/login?returnTo=/import');
|
||||
} else {
|
||||
if (session.authenticated) {
|
||||
signedIn.set(true);
|
||||
}
|
||||
}
|
||||
return {
|
||||
email: session.email
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user