Private
Public Access
fix: faltaba una validacion
This commit is contained in:
1 parent
62ec25b768
commit
3c26c7e6e9
1 file changed
+1
-1
@@ -4,7 +4,7 @@ import type { Usuario } from '../../types';
|
||||
import { getToken } from './token';
|
||||
|
||||
export async function actualizarUsuario(dto: Partial<Usuario>) {
|
||||
if (dto.id <= 0 || !dto.email || !dto.name) return 'Faltan Datos';
|
||||
if (!dto.id || dto.id <= 0 || !dto.email || !dto.name) return 'Faltan Datos';
|
||||
try {
|
||||
const req = await fetch(`${API_URL}/usuarios/${dto.id}`, {
|
||||
method: 'PUT',
|
||||
|
||||
Reference in new issue
Block a user