import { API_URL } from '../env'; import { getToken } from './token'; export async function eliminarPermiso(id: number): Promise { const response = await fetch(`${API_URL}/permisos/${id}`, { method: 'DELETE', headers: { Authorization: `Bearer ${getToken()}` } }); if (!response.ok) throw new Error('Error al eliminar permiso'); }