aboutsummaryrefslogtreecommitdiff
path: root/src/routes/verify/+page.ts
blob: 8e5f69818fa10ae6b35e546145d4f43244df5401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { redirect } from '@sveltejs/kit'
import type { PageLoad } from './$types'

export const load = (async ({ data, url }) => {
	if (data.sid === undefined) {
		throw redirect(303, '/login')
	}
	return {
		errorCode: url.searchParams.get('error'),
		current: url.searchParams.get('current'),
		correct: url.searchParams.get('correct'),
	}
}) satisfies PageLoad