summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-12-13 17:28:14 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-12-13 17:28:14 +0100
commita27449646b8660399b42d1a5448d788de2b3123e (patch)
tree3e1eaa9245a9712449648f76730e96ec6e3180a8
parent872a4a18c46bc90a3327edcbdbf0b94e9eb3a0ba (diff)
downloadprocessor-release/2.21.0.tar.gz
processor-release/2.21.0.zip
API: rename games -> gamesPlayedrelease/2.21.0
-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;