mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-15 22:38:47 +00:00
13 lines
317 B
TypeScript
13 lines
317 B
TypeScript
import { redirect } from "@sveltejs/kit";
|
|
import type { PageServerLoad } from "./$types";
|
|
|
|
export const load: PageServerLoad = async ({ locals, url }) => {
|
|
const redirectPath = url.searchParams.get("redirect") || "/home";
|
|
|
|
if (locals.session) {
|
|
redirect(302, redirectPath);
|
|
}
|
|
|
|
return { redirectPath };
|
|
};
|