feature/rbac y perfiles implementados

This commit is contained in:
2026-05-21 08:00:43 -06:00
parent 546a411df8
commit dc5f9fd6ce
29 changed files with 2007 additions and 977 deletions

View File

@@ -1,5 +1,6 @@
// src/api/pedimentoDocuments.ts
import { fetchWithAuth } from '../fetchWithAuth';
import { extractApiError } from './apiError';
export interface PedimentoDocument {
id: string;
@@ -47,6 +48,6 @@ export async function fetchPedimentoDocuments(
`${API_URL}/record/documents/?${params.toString()}`
);
if (!res.ok) throw new Error('No autorizado o error en la petición');
if (!res.ok) throw new Error(await extractApiError(res));
return res.json();
}