Put limit on things to be sorted

We might have to alter the queries a bit if we aren't happy with the results
This commit is contained in:
Michael Schmatz 2014-12-23 20:19:20 -05:00
parent f361674fb4
commit 2e9e9ee85c

View file

@ -154,6 +154,7 @@ module.exports.getTwoGames = (req, res) ->
.aggregate()
.match(queryParams)
.project(selection)
.limit(5000)
.sort({'submitDate': -1})
.skip(humanSkipCount)
.limit(1)
@ -168,6 +169,7 @@ module.exports.getTwoGames = (req, res) ->
.aggregate()
.match(queryParams)
.project(selection)
.limit(5000)
.sort({'submitDate': -1})
.skip(ogresSkipCount)
.limit(1)