fix analysis of imported game on the app

This commit is contained in:
Thibault Duplessis 2017-10-12 12:53:54 -05:00
parent 4688dc5a03
commit ed080c9115

View file

@ -84,7 +84,7 @@ object UserAnalysis extends LilaController with TheftPrevention {
def game(id: String, color: String) = Open { implicit ctx =>
OptionFuResult(GameRepo game id) { game =>
val pov = Pov(game, chess.Color(color == "white"))
if (game.finished) negotiate(
if (game.replayable) negotiate(
html = fuccess(Redirect(routes.Round.watcher(game.id, color))),
api = apiVersion => mobileAnalysis(pov, apiVersion)
)