remove friendListToggle dead code
parent
176bb46216
commit
ae9d53d472
|
@ -1,9 +1,9 @@
|
|||
package controllers
|
||||
|
||||
import play.api.data._, Forms._
|
||||
import views._
|
||||
|
||||
import lila.app._
|
||||
import views._
|
||||
|
||||
final class Dev(env: Env) extends LilaController(env) {
|
||||
|
||||
|
@ -38,24 +38,12 @@ final class Dev(env: Env) extends LilaController(env) {
|
|||
.bindFromRequest()
|
||||
.fold(
|
||||
_ => BadRequest(html.dev.settings(settingsList)).fuccess,
|
||||
v => {
|
||||
setting.setString(v.toString) inject {
|
||||
(setting.id, setting.get()) match {
|
||||
case ("friendListToggle", v: Boolean) => env.api.influxEvent.friendListToggle(v)
|
||||
case _ =>
|
||||
}
|
||||
Redirect(routes.Dev.settings())
|
||||
}
|
||||
}
|
||||
v => setting.setString(v.toString) inject Redirect(routes.Dev.settings())
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private val commandForm = Form(
|
||||
single(
|
||||
"command" -> nonEmptyText
|
||||
)
|
||||
)
|
||||
private val commandForm = Form(single("command" -> nonEmptyText))
|
||||
|
||||
def cli =
|
||||
Secure(_.Cli) { implicit ctx => _ =>
|
||||
|
|
|
@ -78,7 +78,7 @@ final class Env(
|
|||
|
||||
lazy val cli = wire[Cli]
|
||||
|
||||
lazy val influxEvent = new InfluxEvent(
|
||||
private lazy val influxEvent = new InfluxEvent(
|
||||
ws = ws,
|
||||
endpoint = config.influxEventEndpoint,
|
||||
env = config.influxEventEnv
|
||||
|
|
|
@ -13,8 +13,6 @@ final class InfluxEvent(
|
|||
|
||||
def start() = apply("lila_start", s"Lila starts: $seed")
|
||||
|
||||
def friendListToggle(value: Boolean) = apply(s"friend_list_$value", s"Toggle friend list: $value")
|
||||
|
||||
private def apply(key: String, text: String) =
|
||||
ws.url(endpoint)
|
||||
.post(s"""event,program=lila,env=$env,title=$key text="$text"""")
|
||||
|
|
Loading…
Reference in New Issue