Bind player rankings and fair play to recorded season events (by Codex)
This commit is contained in:
1 parent
6b4aa9772d
commit
738ecc7a09
27 files changed
+436
-36
No files matched your search
@@ -483,6 +483,13 @@ cli::Json ui_read(const ModernState& g, const UiContext& c, const cli::Json& req
|
||||
if (kind == "session") return snapshot(request_id, std::move(m), session_data(g, c));
|
||||
if (kind == "desktop") return snapshot(request_id, std::move(m), desktop_data(g, c, today));
|
||||
if (kind == "camps") return snapshot(request_id, std::move(m), camps_data(g, c, std::to_string(c.state_revision)));
|
||||
if (kind == "player-rankings" || kind == "fairplay") {
|
||||
J data = query_rankings(g, c.manager, request);
|
||||
auto* values = std::get_if<O>(&data.value);
|
||||
if (!values || !values->count("ok") || !std::holds_alternative<bool>(values->at("ok").value) || !std::get<bool>(values->at("ok").value))
|
||||
return failure(request_id, "rankings_unavailable", "Diese Statistik ist im aktuellen Kontext nicht verfügbar.", c.state_revision);
|
||||
values->erase("ok"); return snapshot(request_id, std::move(m), std::move(data));
|
||||
}
|
||||
if (kind == "other-index" || kind == "other-fixtures") {
|
||||
J data = query_projection(g, c.manager, request);
|
||||
auto* values = std::get_if<O>(&data.value);
|
||||
|
||||
Reference in new issue
Block a user