Files
classquiz-ai/frontend/src/routes/account/controllers/add/wait/+page.server.ts
T
2025-09-21 10:48:07 +02:00

19 lines
453 B
TypeScript

// SPDX-FileCopyrightText: 2023 Marlon W (Mawoka)
//
// SPDX-License-Identifier: MPL-2.0
import { error } from '@sveltejs/kit';
import type { PageServerLoad } from './$types';
export const load = (({ url }) => {
const code = url.searchParams.get('code');
const id = url.searchParams.get('id');
if (!id || !code) {
error(404, JSON.stringify({ detail: 'id and/or code are/is missing' }));
}
return {
id,
code
};
}) satisfies PageServerLoad;