code tweaks

This commit is contained in:
Thibault Duplessis 2018-05-08 21:27:05 +02:00
parent 3f41ad5a83
commit 7f7088c357
2 changed files with 1 additions and 2 deletions

View file

@ -32,7 +32,7 @@ object Bot extends LilaController {
cmd.split('/') match {
case Array("account", "upgrade") =>
lila.user.UserRepo.setBot(me) >>- Env.user.lightUserApi.invalidate(me.id) inject jsonOkResult recover {
case e: Exception => BadRequest(jsonError(e.getMessage))
case e: lila.base.LilaException => BadRequest(jsonError(e.getMessage))
}
case Array("game", id, "chat") => WithBot(me) {
Env.bot.form.chat.bindFromRequest.fold(

View file

@ -516,7 +516,6 @@ GET /api/user/:name/games controllers.Api.userGames(name: String)
# Bot API
GET /api/bot/game/stream/:id controllers.Bot.gameStream(id: String)
POST /api/bot/game/:id/move/:uci controllers.Bot.move(id: String, uci: String)
# /bot/account/upgrade
POST /api/bot/*cmd controllers.Bot.command(cmd: String)
# Account