lila/app/controllers/ForumCateg.scala

24 lines
548 B
Scala
Raw Normal View History

2013-04-09 12:58:34 -06:00
package controllers
import lila.app._
import views._
object ForumCateg extends LilaController with ForumController {
2014-02-17 02:12:19 -07:00
def index = Open { implicit ctx =>
2015-04-10 02:47:00 -06:00
NotForKids {
categApi.list(ctx.userId ?? teamCache.teamIds, ctx.troll) map { html.forum.categ.index(_) }
}
}
2013-04-09 12:58:34 -06:00
2014-02-17 02:12:19 -07:00
def show(slug: String, page: Int) = Open { implicit ctx =>
2015-04-10 02:47:00 -06:00
NotForKids {
CategGrantRead(slug) {
OptionOk(categApi.show(slug, page, ctx.troll)) {
case (categ, topics) => html.forum.categ.show(categ, topics)
}
}
}
}
2013-04-09 12:58:34 -06:00
}