team-1/frontend/src/routes/room/[id]/+page.ts

12 lines
292 B
TypeScript
Raw Normal View History

2025-08-02 00:52:13 +02:00
import { error, type Load, type ServerLoad } from "@sveltejs/kit"
import type { PageLoad } from "./$types"
export const load: PageLoad = async ({ params }) => {
if (params.id) {
return {
roomId: params.id,
}
}
error(400, "Please provide a room id")
}