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; }