sort by relevance (number of players participating.)

This commit is contained in:
Gordon Martin 2016-09-04 15:01:10 +01:00
parent 59bf24ce9d
commit a64f99d57a

View file

@ -12,7 +12,7 @@ import play.api.mvc.Results._
import lila.evaluation.{ PlayerAssessment }
import lila.tournament.TournamentRepo
import lila.tournament.Tournament
import lila.tournament.{ Tournament => TournamentModel}
import chess.Color
@ -47,9 +47,8 @@ object Mod extends LilaController {
/**
* Sort the tournaments by the tournaments most likely to require moderation attention
*/
def sortTournamentsByRelevance(tournaments : List[Tournament]) : List[Tournament] = {
tournaments
}
def sortTournamentsByRelevance(tournaments : List[TournamentModel]) : List[TournamentModel] =
tournaments.sortBy(-_.nbPlayers)
def booster(username: String) = Secure(_.MarkBooster) { _ =>
me => modApi.toggleBooster(me.id, username) inject redirect(username)