From 4c0228254990e56c489df064879c95a6287839b0 Mon Sep 17 00:00:00 2001 From: estevez-dev Date: Mon, 25 May 2020 13:46:55 +0300 Subject: [PATCH] Fix debug messages --- functions/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/index.js b/functions/index.js index 3059450..e68448f 100644 --- a/functions/index.js +++ b/functions/index.js @@ -203,7 +203,7 @@ async function handleRequest(req, res, payloadHandler) { docData.totalCount = docData.totalCount + 1; - if (debug) console.log('Sending payload', JSON.stringify(payload)); + if (debug()) console.log('Sending payload', JSON.stringify(payload)); var messageId; try { @@ -220,7 +220,7 @@ async function handleRequest(req, res, payloadHandler) { if (updateRateLimits) { await writeRateLimits(ref, docExists, docData, res); } else { - if (debug) console.log('Not updating rate limits because notification is critical or command'); + if (debug()) console.log('Not updating rate limits because notification is critical or command'); } return res.status(201).json({