feat: translate API error messages to English
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -80,7 +80,7 @@ export async function POST(request: NextRequest) {
|
||||
}
|
||||
|
||||
if (!['super_admin', 'site_admin'].includes(session.user.role)) {
|
||||
return NextResponse.json({ error: 'Sin permisos' }, { status: 403 });
|
||||
return NextResponse.json({ error: 'Insufficient permissions' }, { status: 403 });
|
||||
}
|
||||
|
||||
const body = await request.json();
|
||||
@@ -88,7 +88,7 @@ export async function POST(request: NextRequest) {
|
||||
|
||||
if (!name || !address) {
|
||||
return NextResponse.json(
|
||||
{ error: 'Nombre y dirección son requeridos' },
|
||||
{ error: 'Name and address are required' },
|
||||
{ status: 400 }
|
||||
);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ export async function POST(request: NextRequest) {
|
||||
} catch (error) {
|
||||
console.error('Error creating site:', error);
|
||||
return NextResponse.json(
|
||||
{ error: 'Error al crear sede' },
|
||||
{ error: 'Error creating site' },
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user