From 053818231a8dc91f2b8813f0fd0b2e642707cfd5 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Sat, 21 Jan 2023 22:13:29 +0100 Subject: [PATCH] message recipient bugfix --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 4b5afcc..19894c7 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ // Global logging toggles // const fileLogging = false; -const consoleLogging = false; +const consoleLogging = true; // Imports @@ -87,7 +87,7 @@ app.post('/nickname', (req, res) => { for (const u of users) if (u.name === oldName && u.id === id) { if (consoleLogging) - console.log(`(Re-)named user with ID '${oldName}#${id}'.`); + console.log(`Renamed user with ID '${oldName}#${id}'.`); u.name = name; u.id = currentID; break; @@ -140,7 +140,7 @@ app.post('/message', (req, res) => { // Log message for debugging if (consoleLogging) - console.log(`User '${name}#${id}' sent message '${message}'.`); + console.log(`User '${name}#${id}' sent message '${message}' to '${recipient}'.`); // Confirm process res.status(200).send();