Seleccion en la tabla

This commit is contained in:
Andres2908
2022-02-10 00:44:23 -06:00
parent a157df8966
commit fe3d5c4f91
6 changed files with 13 additions and 10 deletions
@@ -1,10 +1,12 @@
const validar = require('../../helper/validar');
const { Op } = require('sequelize');
const dbPath = '../../db/tablas';
const Usuario = require(`${dbPath}/Usuario`);
const Inscripcion = require(`${dbPath}/Inscripcion`);
const todasInscripciones = async (body) => {
return Inscripcion.findAll({
where: { validacion: body.validacion },
include: [
{
model: Usuario,
+1 -1
View File
@@ -21,7 +21,7 @@ const validarTicket = async (body) => {
})
.then((res) => {
console.log(body.validacion);
if (body.validacion === false)
if (body.validacion === 0)
throw new Error('El administrador a declinado el ticket');
})
.then((res) => ({