actualizacion del ticket

This commit is contained in:
Andres2908
2022-03-15 18:26:51 -06:00
parent c5f488a7c9
commit 52a6cb614b
6 changed files with 98 additions and 7 deletions
+5 -4
View File
@@ -10,9 +10,11 @@ const validarTicket = async (body) => {
.then((res) => {
if (!res) throw new Error('Este folio no existe');
idUsuario = res.idUsuario;
return Inscripcion.findOne({
where: { folio: body.folio, validacion: 1 },
});
if (body.validacion == 1) {
return Inscripcion.findOne({
where: { folio: body.folio, validacion: 1 },
});
}
})
.then((res) => {
if (res) throw new Error('Este folio ya fue validado');
@@ -23,7 +25,6 @@ const validarTicket = async (body) => {
{
where: {
folio: body.folio,
validacion: 2,
},
}
);