mirror of
https://github.com/ION606/selmer-bot-website.git
synced 2026-05-14 22:16:54 +00:00
Fixed an issue with the calendar UI and added timestamps to the session storage for help with database cleaning
This commit is contained in:
+1
-1
@@ -373,7 +373,7 @@
|
|||||||
calSpacing.cellPadding = 1;
|
calSpacing.cellPadding = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// document.getElementById('calHeader').style.display = "block"; //Breaks the calendar
|
document.getElementById('calHeader').style = "";
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -74,8 +74,14 @@ app.post('/user', async(request, response) => {
|
|||||||
connection.then((client) => {
|
connection.then((client) => {
|
||||||
const sessionId = uuidv4();
|
const sessionId = uuidv4();
|
||||||
|
|
||||||
|
//Used for database clearing
|
||||||
|
const d = new Date();
|
||||||
|
d.setHours(0);
|
||||||
|
d.setMinutes(0);
|
||||||
|
d.setSeconds(0);
|
||||||
|
|
||||||
const dbo = client.db('main').collection('sessions');
|
const dbo = client.db('main').collection('sessions');
|
||||||
dbo.insertOne({ sessionId: sessionId, userId: id, guilds: JSON.stringify(guilds), currentServer: null });
|
dbo.insertOne({ sessionId: sessionId, userId: id, guilds: JSON.stringify(guilds), currentServer: null, timeStamp: d.getTime() });
|
||||||
|
|
||||||
response.send(sessionId);
|
response.send(sessionId);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user