Skip to content
Browse files

sort by least voted on

  • Loading branch information...
1 parent 060f63e commit bfbef64b554c5558876cb5b363387e6183f62afb Visnu Pitiyanuvath committed Aug 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 controllers/teams.coffee
View
2 controllers/teams.coffee
@@ -37,7 +37,7 @@ app.get /^\/teams(\/pending)?\/?$/, (req, res, next) ->
app.get /^\/(entries)?\/?$/, (req, res, next) ->
page = (req.param('page') or 1) - 1
query = { 'entry.votable': true, lastDeploy: {$ne: null} }
- options = { sort: [['updatedAt', 1]], limit: 50, skip: 50 * page }
+ options = { sort: [['voteCounts.judge', 1]], limit: 50, skip: 50 * page }
Team.find query, {}, options, (err, teams) ->
return next err if err
Team.count query, (err, count) ->

0 comments on commit bfbef64

Please sign in to comment.
Something went wrong with that request. Please try again.