summaryrefslogtreecommitdiff
path: root/worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'worker.js')
-rw-r--r--worker.js13
1 files 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;