Skip to content

Commit

Permalink
Merge pull request #190 from agco/feature/AGCMD-4008
Browse files Browse the repository at this point in the history
cast limit and offset to ints since mongo 3.2 is sensitive.
  • Loading branch information
ssebro authored Mar 20, 2017
2 parents 3211be0 + e5a5d15 commit f550d10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,8 @@ function route(harvester, name, model, schema, routeOptions) {
var query = _.clone(req.query);
query.ids && (query.id = ids) && (delete query.ids);

var limit = query.limit;
var offset = query.offset;
var limit = parseInt(query.limit, 10);
var offset = parseInt(query.offset,10);

var sortParams = req.query["sort"];
var sort;
Expand Down

0 comments on commit f550d10

Please sign in to comment.