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) => ({
@@ -49,7 +49,8 @@ const inscripcion = async (body, file) => {
fs.renameSync(file.path, file.path + '.' + file.mimetype.split('/')[1]);
})
.then((res) => ({
message: '¡La inscripción se realizo de manera correcta!',
message:
'¡La inscripción se realizo de manera correcta! Confirma en el siguiente sitio web tu inscripción: <a href="https://kalinga.acatlan.unam.mx/cedetec/" target="_blank">Kalinga</a>',
}))
.catch((err) => {
if (file) eliminarArchivo(file.path);