fixed a few errors
This commit is contained in:
@@ -93,7 +93,7 @@ export async function POST(
|
|||||||
|
|
||||||
if (error instanceof ZodError) {
|
if (error instanceof ZodError) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ error: error.errors[0].message },
|
{ error: error.issues[0].message },
|
||||||
{ status: 400 }
|
{ status: 400 }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ export async function POST(
|
|||||||
console.error('Room action error:', error);
|
console.error('Room action error:', error);
|
||||||
|
|
||||||
if (error instanceof ZodError) {
|
if (error instanceof ZodError) {
|
||||||
return NextResponse.json({ error: error.errors[0].message }, { status: 400 });
|
return NextResponse.json({ error: error.issues[0].message }, { status: 400 });
|
||||||
}
|
}
|
||||||
|
|
||||||
return NextResponse.json({ error: 'Invalid request' }, { status: 400 });
|
return NextResponse.json({ error: 'Invalid request' }, { status: 400 });
|
||||||
|
|||||||
Reference in New Issue
Block a user