feat(captura): fechas de Obra bloqueadas tras establecerse, solo admin las cambia
This commit is contained in:
@@ -161,7 +161,10 @@ export async function guardarCampo(data: {
|
||||
}),
|
||||
)
|
||||
manejar401(resp)
|
||||
if (!resp.ok) throw new Error(`HTTP ${resp.status}`)
|
||||
if (!resp.ok) {
|
||||
const cuerpo = (await resp.json().catch(() => null)) as { error?: string } | null
|
||||
throw new Error(cuerpo?.error ?? `HTTP ${resp.status}`)
|
||||
}
|
||||
}
|
||||
|
||||
/** POST /api/captura/bulk — guardar múltiples campos */
|
||||
@@ -183,5 +186,8 @@ export async function guardarBulk(data: {
|
||||
}),
|
||||
)
|
||||
manejar401(resp)
|
||||
if (!resp.ok) throw new Error(`HTTP ${resp.status}`)
|
||||
if (!resp.ok) {
|
||||
const cuerpo = (await resp.json().catch(() => null)) as { error?: string } | null
|
||||
throw new Error(cuerpo?.error ?? `HTTP ${resp.status}`)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user