lila/app/controllers/Stat.scala

17 lines
442 B
Scala
Raw Normal View History

2015-09-20 14:04:02 -06:00
package controllers
import lila.app._
import views._
object Stat extends LilaController {
def ratingDistribution(perfKey: lila.rating.Perf.Key) = Open { implicit ctx =>
2015-12-25 23:52:06 -07:00
lila.rating.PerfType(perfKey).filter(lila.rating.PerfType.isGame) match {
case Some(perfType) => Env.user.cached.ratingDistribution(perfType) map { data =>
2015-09-20 14:04:02 -06:00
Ok(html.stat.ratingDistribution(perfType, data))
}
case _ => notFound
}
}
}