From 127903e4236ee7e37a2ebbde149682fc460a0c2f Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Mon, 6 Feb 2023 09:29:11 +0100 Subject: [PATCH] moved log message --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 7edd168..7728994 100644 --- a/index.js +++ b/index.js @@ -235,13 +235,13 @@ app.post('/activity', (req, res) => { // Retrieve user data const { name, id } = req.body; - // Log activity - if (consoleLogging) - console.log(`User with ID '${name}#${id}' is online.`); - // Save activity for (const u of users) if (u.name === name && u.id === id) { + // Log activity + if (consoleLogging) + console.log(`User with ID '${name}#${id}' is online.`); + u.seen = new Date(); break; }