Buscamos por número de cuenta
This commit is contained in:
@@ -5,11 +5,13 @@ const Usuario = require(`${dbPath}/Usuario`);
|
||||
const Inscripcion = require(`${dbPath}/Inscripcion`);
|
||||
|
||||
const todasInscripciones = async (body) => {
|
||||
const numeroCuenta = validar.validarNumeroCuenta(body.numeroCuenta);
|
||||
return Inscripcion.findAll({
|
||||
where: { validacion: body.validacion },
|
||||
include: [
|
||||
{
|
||||
model: Usuario,
|
||||
where: { numeroCuenta: { [Op.like]: `%${body.numeroCuenta}%` } },
|
||||
attributes: ['idUsuario', 'numeroCuenta'],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user