aboutsummaryrefslogtreecommitdiffstats
path: root/code/app/src/routes/(main)/(public)/portal/+page.ts
blob: 72338cba645f523a7361cf46e5735bc5e23a1cfd (plain) (blame)
1
2
3
4
5
6
7
8
9
import type { PortalMessage } from '$configuration';
import { redirect } from '@sveltejs/kit';
import type { PageLoad } from './$types';

export const load: PageLoad = async ({ url }) => {
    const message = url.searchParams.get("msg") as PortalMessage;
    if (!message) throw redirect(302, "/");
    return { message };
};