full working application and initial commit
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import { createConvexAuthHandlers } from '@mmailaender/convex-auth-svelte/sveltekit/server';
|
||||
import type { PageServerLoad } from './$types.js';
|
||||
|
||||
const { isAuthenticated } = createConvexAuthHandlers();
|
||||
|
||||
export const load: PageServerLoad = async (event) => {
|
||||
throw redirect(302, (await isAuthenticated(event)) ? '/dashboard' : '/signin');
|
||||
};
|
||||
Reference in New Issue
Block a user