From a27449646b8660399b42d1a5448d788de2b3123e Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 13 Dec 2017 17:28:14 +0100 Subject: API: rename games -> gamesPlayed --- worker.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/worker.js b/worker.js index edeb5f1..799e731 100644 --- a/worker.js +++ b/worker.js @@ -82,12 +82,13 @@ function flatten(o) { o.rank_points_blitz = o.rank_points.blitz || 0; delete o.rank_points; } - if ("games" in o) { - o.played_ranked = o.games.ranked || 0; - o.played_casual = o.games.casual || 0; - o.played_blitz = o.games.blitz || 0; - o.played_aral = o.games.aral || 0; - delete o.games; + if ("games_played" in o) { + o.played_ranked = o.games_played.ranked || 0; + o.played_casual = o.games_played.casual || 0; + o.played_blitz = o.games_played.blitz || 0; + o.played_blitz_rounds = o.games_played.blitz_rounds || 0; + o.played_aral = o.games_played.aral || 0; + delete o.games_played; } delete o.type; return o; -- cgit v1.3.1