summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-04-08 18:19:01 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-04-08 18:19:01 +0200
commit944f994742edcbccfd20232e2a0a88b38e4e6a28 (patch)
treeee2d64f77b7c1b3d38e6abf99448527056f49ab2
parent9ad85389c1c232e525b193614a6d0feaa2cff8b1 (diff)
downloadprocessor-944f994742edcbccfd20232e2a0a88b38e4e6a28.tar.gz
processor-944f994742edcbccfd20232e2a0a88b38e4e6a28.zip
push winner to roster
-rw-r--r--worker.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/worker.js b/worker.js
index 6565884..558f3ed 100644
--- a/worker.js
+++ b/worker.js
@@ -138,6 +138,8 @@ var RABBITMQ_URI = process.env.RABBITMQ_URI,
roster.matchApiId = match.id;
roster.attributes.shardId = match.attributes.shardId;
roster.createdAt = match.createdAt;
+ // TODO API workaround: roster does not have `winner`
+ roster.attributes.stats.winner = roster.participants[0].stats.winner;
roster.participants = roster.participants.map((participant) => {
participant.attributes.shardId = roster.attributes.shardId;