6 lines
190 B
TypeScript
6 lines
190 B
TypeScript
import { redirect, type ServerLoad } from '@sveltejs/kit';
|
|
|
|
export const load: ServerLoad = async ({ parent }) => {
|
|
const { user } = await parent();
|
|
if (!user) redirect(302, '/login');
|
|
};
|