Private
Public Access
hecho crud de permisos
This commit is contained in:
1 parent
0370a958b4
commit
4062a0232f
8 files changed
+369
-1
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import { API_URL } from '../env';
|
||||
import { getToken } from './token';
|
||||
|
||||
export async function eliminarPermiso(id: number): Promise<void> {
|
||||
const response = await fetch(`${API_URL}/permisos/${id}`, {
|
||||
method: 'DELETE',
|
||||
headers: { Authorization: `Bearer ${getToken()}` }
|
||||
});
|
||||
if (!response.ok) throw new Error('Error al eliminar permiso');
|
||||
}
|
||||
Reference in new issue
Block a user