From dc7dadd9a120ccf8d821d19bd99c9d977cde5948 Mon Sep 17 00:00:00 2001 From: Joe Dowd Date: Mon, 24 Aug 2020 22:43:36 +0100 Subject: [PATCH] tidy undesolved fix --- src/utils/logger.js | 2 +- src/utils/webhookUtils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/logger.js b/src/utils/logger.js index 96f6360..731b5cf 100644 --- a/src/utils/logger.js +++ b/src/utils/logger.js @@ -45,7 +45,7 @@ const settings = { if (config.mode === 'development') { settings.INFO = true; settings.DEBUG = true; -} if (config.mode === 'test') { +} else if (config.mode === 'test') { settings.WARN = false; } diff --git a/src/utils/webhookUtils.js b/src/utils/webhookUtils.js index 41a2b13..6da1d62 100644 --- a/src/utils/webhookUtils.js +++ b/src/utils/webhookUtils.js @@ -35,7 +35,7 @@ function dispatchEvent(scope, data) { let authKey = webhook.key; let scopes = webhook.scopes || []; if (!scopes.includes(scope.toLowerCase())) return; - let hookRequest = request.post(webhookURL, {json: data, headers: { + request.post(webhookURL, {json: data, headers: { "Authorization": authKey, "Event-Type": scope // Maybe change this in the future? }}).on('error', (e) => {