Private
Public Access
estado intermedio
This commit is contained in:
1 parent
fcc3952841
commit
617583def5
9 files changed
+52
-165
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import { API_URL } from '../env';
|
||||
import { getToken } from './token';
|
||||
|
||||
export async function borrarUsuario(id: number): Promise<void> {
|
||||
const response = await fetch(`${API_URL}/users/${id}`, {
|
||||
method: 'DELETE',
|
||||
headers: { Authorization: `Bearer ${getToken()}` }
|
||||
});
|
||||
if (!response.ok) throw new Error('Error al eliminar usuario');
|
||||
}
|
||||
Reference in new issue
Block a user