fix: harden booking and meeting flows

This commit is contained in:
2026-09-17 02:42:27 +02:00
parent cb30ecade9
commit 66710fc65c
42 changed files with 683 additions and 608 deletions
@@ -19,6 +19,7 @@ export async function POST(request: Request, { params }: Args) {
let body: { participantId?: unknown };
try {
body = await request.json();
if (!body || typeof body !== "object" || Array.isArray(body)) throw new Error("Invalid body");
} catch {
return NextResponse.json({ error: "Ungültige Anfrage." }, { status: 400 });
}
@@ -29,7 +30,7 @@ export async function POST(request: Request, { params }: Args) {
try {
const roomService = getLiveKitRoomService();
const room = getLiveKitRoomName(slug);
const room = getLiveKitRoomName(slug, host.accessVersion);
const participant = (await roomService.listParticipants(room)).find((item) => item.identity === participantId);
if (!participant) return NextResponse.json({ error: "Teilnehmer nicht gefunden." }, { status: 404 });