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