summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--worker.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/worker.js b/worker.js
index 3618c01..f29deca 100644
--- a/worker.js
+++ b/worker.js
@@ -5,7 +5,6 @@
var amqp = require("amqplib"),
request = require("request-promise"),
sleep = require("sleep-promise"),
- snakeCaseKeys = require("snakecase-keys"),
jsonapi = require("./jsonapi");
var MADGLORY_TOKEN = process.env.MADGLORY_TOKEN,
@@ -44,7 +43,7 @@ if (MADGLORY_TOKEN == undefined) throw "Need an API token";
// send match structure
await Promise.all(matches
.map(async (match) => await ch.sendToQueue("process",
- new Buffer(JSON.stringify(snakeCaseKeys(match))), {
+ new Buffer(JSON.stringify(match)), {
persistent: true,
type: "match",
headers: {
@@ -57,7 +56,7 @@ if (MADGLORY_TOKEN == undefined) throw "Need an API token";
await Promise.all(data.included
.filter((o) => o.type == "player" || o.type == "team")
.map(async (o) => await ch.sendToQueue("process",
- new Buffer(JSON.stringify(snakeCaseKeys(o))), {
+ new Buffer(JSON.stringify(o)), {
persistent: true,
type: o.type,
headers: {