feat: translate API error messages to English

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ivan
2026-03-01 21:24:54 +00:00
parent 3aeda8c2fb
commit d3419a8cc5
9 changed files with 84 additions and 84 deletions

View File

@@ -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 }
);
}