tournament game not found should redirect to tournament page

This commit is contained in:
Thibault Duplessis 2015-10-02 21:31:25 +02:00
parent 297f361aed
commit 71741bc21d

View file

@ -85,7 +85,7 @@ object Tournament extends LilaController {
val userId = lila.user.User normalize user
OptionFuResult(PairingRepo.byTourUserNb(id, userId, nb)) { pairing =>
GameRepo game pairing.id map {
_.flatMap { Pov.ofUserId(_, userId) }.fold(NotFound(Redirect(routes.Tournament show id)))(withPov)
_.flatMap { Pov.ofUserId(_, userId) }.fold(Redirect(routes.Tournament show id))(withPov)
}
}
}