fix: harden booking and meeting flows
This commit is contained in:
@@ -38,6 +38,7 @@ export async function POST(request: Request, { params }: Args) {
|
||||
let body: { name?: unknown; email?: 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 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user