From 091088a6a7131c81a8cc724948385b16930014ba Mon Sep 17 00:00:00 2001 From: schneefux Date: Sun, 2 Apr 2017 20:31:28 +0200 Subject: push shardId to the right places --- worker.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'worker.js') diff --git a/worker.js b/worker.js index 6ff904e..ab98564 100644 --- a/worker.js +++ b/worker.js @@ -90,11 +90,11 @@ var RABBITMQ_URI = process.env.RABBITMQ_URI || "amqp://localhost", // also, push missing fields and snakecasify match.rosters = match.rosters.map((roster) => { roster.matchApiId = match.id; - roster.shardId = match.shardId; + roster.attributes.shardId = match.attributes.shardId; roster.createdAt = match.createdAt; roster.participants = roster.participants.map((participant) => { - participant.shardId = roster.shardId; + participant.attributes.shardId = roster.attributes.shardId; participant.rosterApiId = roster.id; participant.createdAt = roster.createdAt; participant.playerApiId = participant.player.id; @@ -141,7 +141,7 @@ var RABBITMQ_URI = process.env.RABBITMQ_URI || "amqp://localhost", // redefine participant.items for our custom map participant.attributes.stats.items = itms; - participant.player.shardId = participant.shardId; + participant.player.attributes.shardId = participant.attributes.shardId; participant.player = snakeCaseKeys(flatten(participant.player)); return snakeCaseKeys(flatten(participant)); }); @@ -149,7 +149,7 @@ var RABBITMQ_URI = process.env.RABBITMQ_URI || "amqp://localhost", }); match.assets = match.assets.map((asset) => { asset.matchApiId = match.id; - asset.shardId = match.shardId; + asset.attributes.shardId = match.attributes.shardId; return snakeCaseKeys(flatten(asset)); }); match = snakeCaseKeys(flatten(match)); -- cgit v1.3.1