diff --git a/server/controller/Usuario/quitarMulta.js b/server/controller/Usuario/quitarMulta.js index 8f9d819..5502f4d 100644 --- a/server/controller/Usuario/quitarMulta.js +++ b/server/controller/Usuario/quitarMulta.js @@ -8,7 +8,7 @@ const usuario = async (body) => { return Usuario.findOne({ where: { idUsuario } }) .then((res) => { if (!res) throw new Error('No existe este usuario.'); - if (res.activo) throw new Error('Esta cuenta ya se encuentra activa.'); + if (!res.multa) throw new Error('Este usuario no tiene multa.'); return Usuario.update({ activo: false }, { where: { idUsuario } }); }) .then((res) => ({