Spróbuj dodać query()
zadzwoń do sieci, jak
Locations
.forge()
.query(function(qb) {
qb.whereBetween('creation', [initialDate, finalDate]);
})
.fetch()
.then(function (collection) {
res.json({error: false, data: collection.toJSON()});
})
.catch(function (err) {
res.status(500).json({error: true, data: {message: err.message}});
});
Zobacz Regał Collection.query() i Knex Kreator zapytań i whereBetween()