0
This is the function that performs the query:
router.get('/out_filtered', async (req, res, next) => {
try {
const dateStart = req.body.date_start;
const dateEnd = req.body.date_end;
console.log('start', dateStart);
console.log('end', dateEnd);
const where = {
date_create: {
[Op.between]: [dateStart, dateEnd],
}
};
const result = await cashFlowOutsModel.findAll({
where,
logging: console.log
});
return res.status(200).send(result);
} catch (err) {
console.log(err)
res.logger.log('error', err);
return res.status(500).send(err);
}
});
How I’m passing the parameters: How the request is done, by console log: Times that are passed via parameter do not match the query.
Which bank is Voce using? postgres or mysql? if it is postgres, I think I know what the problem is.
– Cmte Cardeal
If possible, show how your
const sequelize = new Sequelize()
.– Cmte Cardeal
const Sequelize = require('sequelize');
– Henrique Mendes Silveira Rodri
am using mysql
– Henrique Mendes Silveira Rodri