I am adding the limit and offset options to my find method but only the offset is being applied. I also tried hard coding the values but I got the same result.
module.exports = function (app) {
app.get("/customer", function (req, res) {
req.db.models.Customer.find({ }, { limit: req.query.limit, offset: req.query.offset}, function (err, results) {
var response = {
results : [],
success : false
};
response.total = results.length;
response.results = results;
res.send(response);
});
});
I am adding the limit and offset options to my find method but only the offset is being applied. I also tried hard coding the values but I got the same result.