ongoing games cannot be exported
because the current state of ongoing games is protected see this endpoint instead: https://lichess.org/api#operation/apiUserCurrentGame requires changing #9180pull/9206/head
parent
ae7af3e966
commit
2bdaa990f2
|
@ -89,7 +89,6 @@ final class Game(
|
|||
perfType = (~get("perfType", req) split "," flatMap { lila.rating.PerfType(_) }).toSet,
|
||||
color = get("color", req) flatMap chess.Color.fromName,
|
||||
analysed = getBoolOpt("analysed", req),
|
||||
ongoing = getBool("ongoing", req),
|
||||
flags = requestPgnFlags(req, extended = false).copy(literate = false),
|
||||
perSecond = MaxPerSecond(me match {
|
||||
case Some(m) if m is user.id => 60
|
||||
|
|
|
@ -112,8 +112,7 @@ final class GameApiV2(
|
|||
gameRepo
|
||||
.sortedCursor(
|
||||
config.vs.fold(Query.user(config.user.id)) { Query.opponents(config.user, _) } ++
|
||||
Query.createdBetween(config.since, config.until) ++
|
||||
(!config.ongoing).??(Query.finished),
|
||||
Query.createdBetween(config.since, config.until) ++ Query.finished,
|
||||
Query.sortCreated,
|
||||
batchSize = config.perSecond.value
|
||||
)
|
||||
|
@ -354,7 +353,6 @@ object GameApiV2 {
|
|||
rated: Option[Boolean] = None,
|
||||
perfType: Set[lila.rating.PerfType],
|
||||
analysed: Option[Boolean] = None,
|
||||
ongoing: Boolean = false,
|
||||
color: Option[chess.Color],
|
||||
flags: WithFlags,
|
||||
perSecond: MaxPerSecond,
|
||||
|
|
Loading…
Reference in New Issue