set ongoing flag if !finished

pull/10075/head
Thibault Duplessis 2021-11-03 08:46:42 +01:00
parent ae47f1b3a9
commit 1c1582b8e5
1 changed files with 3 additions and 2 deletions

View File

@ -74,6 +74,7 @@ final class Game(
_ ?? { user =>
val format = GameApiV2.Format byRequest req
WithVs(req) { vs =>
val finished = getBoolOpt("finished", req) | true
val config = GameApiV2.ByUserConfig(
user = user,
format = format,
@ -94,8 +95,8 @@ final class Game(
case _ => 20
}),
playerFile = get("players", req),
ongoing = getBool("ongoing", req),
finished = getBoolOpt("finished", req) | true
ongoing = getBool("ongoing", req) || !finished,
finished = finished
)
if (me.exists(_.id == "openingexplorer"))
Ok.chunked(env.api.gameApiV2.exportByUser(config))