boredgame/src/routes/(app)/(protected)/collection/add/+page.server.ts

11 lines
234 B
TypeScript
Raw Normal View History

import { redirect } from "@sveltejs/kit";
import type { PageServerLoad } from "../$types";
export const load: PageServerLoad = async ({ locals, fetch }) => {
const user = locals.user;
if (!user) {
redirect(302, '/login');
}
}