fix: faltaba una validacion

This commit is contained in:
fede committed 2026-06-07 16:12:48 -03:00
1 parent 62ec25b768
commit 3c26c7e6e9
1 file changed
+1 -1
+1 -1
View File
@@ -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',