only feature simuls whose host rating is >= 1700
This commit is contained in:
parent
37684166aa
commit
7096fbd6ca
|
@ -31,7 +31,7 @@ object Lobby extends LilaController {
|
|||
Env.current.preloader(
|
||||
posts = Env.forum.recent(ctx.me, Env.team.cached.teamIds),
|
||||
tours = Env.tournament promotable true,
|
||||
simuls = Env.simul allCreated true
|
||||
simuls = Env.simul allCreatedFeaturable true
|
||||
) map (html.lobby.home.apply _).tupled map { template =>
|
||||
// the session cookie is required for anon lobby filter storage
|
||||
ctx.req.session.data.contains(LilaCookie.sessionId).fold(
|
||||
|
|
|
@ -97,6 +97,8 @@ final class Env(
|
|||
|
||||
val allCreated = lila.memo.AsyncCache.single(repo.allCreated, timeToLive = CreatedCacheTtl)
|
||||
|
||||
val allCreatedFeaturable = lila.memo.AsyncCache.single(repo.allCreatedFeaturable, timeToLive = CreatedCacheTtl)
|
||||
|
||||
def version(tourId: String): Fu[Int] =
|
||||
socketHub ? Ask(tourId, GetVersion) mapTo manifest[Int]
|
||||
|
||||
|
|
|
@ -57,6 +57,12 @@ private[simul] final class SimulRepo(simulColl: Coll) {
|
|||
createdSelect
|
||||
).sort(createdSort).cursor[Simul].collect[List]()
|
||||
|
||||
def allCreatedFeaturable: Fu[List[Simul]] = simulColl.find(
|
||||
createdSelect ++ BSONDocument(
|
||||
"hostRating" -> BSONDocument("$gte" -> 1700)
|
||||
)
|
||||
).sort(createdSort).cursor[Simul].collect[List]()
|
||||
|
||||
def allStarted: Fu[List[Simul]] = simulColl.find(
|
||||
startedSelect
|
||||
).sort(createdSort).cursor[Simul].collect[List]()
|
||||
|
|
Loading…
Reference in a new issue