Seleccion en la tabla
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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) => ({
|
||||
|
||||
Reference in New Issue
Block a user