moved log message
This commit is contained in:
parent
f408548ab0
commit
127903e423
8
index.js
8
index.js
@ -235,13 +235,13 @@ app.post('/activity', (req, res) => {
|
|||||||
// Retrieve user data
|
// Retrieve user data
|
||||||
const { name, id } = req.body;
|
const { name, id } = req.body;
|
||||||
|
|
||||||
// Log activity
|
|
||||||
if (consoleLogging)
|
|
||||||
console.log(`User with ID '${name}#${id}' is online.`);
|
|
||||||
|
|
||||||
// Save activity
|
// Save activity
|
||||||
for (const u of users)
|
for (const u of users)
|
||||||
if (u.name === name && u.id === id) {
|
if (u.name === name && u.id === id) {
|
||||||
|
// Log activity
|
||||||
|
if (consoleLogging)
|
||||||
|
console.log(`User with ID '${name}#${id}' is online.`);
|
||||||
|
|
||||||
u.seen = new Date();
|
u.seen = new Date();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user