aboutsummaryrefslogtreecommitdiff
path: root/src/routes/verify/+page.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/verify/+page.ts')
-rw-r--r--src/routes/verify/+page.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/routes/verify/+page.ts b/src/routes/verify/+page.ts
new file mode 100644
index 0000000..8e5f698
--- /dev/null
+++ b/src/routes/verify/+page.ts
@@ -0,0 +1,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