Cambio de usuario para la base y restriccion de validacion
This commit is contained in:
@@ -17,11 +17,13 @@ const validarTicket = async (body) => {
|
||||
{
|
||||
where: {
|
||||
folio: body.folio,
|
||||
validacion: 2,
|
||||
},
|
||||
}
|
||||
);
|
||||
})
|
||||
.then((res) => {
|
||||
if (!res) throw new Error('Este ticket ya fue validado');
|
||||
if (body.validacion === 0)
|
||||
throw new Error(
|
||||
'El administrador a declinado el ticket, ya que los datos no coinciden.'
|
||||
|
||||
Reference in New Issue
Block a user