From 94a1189d8becec42ed0d949b3d441e5006bf68d9 Mon Sep 17 00:00:00 2001 From: Mhykol Date: Sun, 13 Oct 2024 03:23:29 -0400 Subject: Fixed sessions --- source/session.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/session.js b/source/session.js index 5846271..40d0563 100644 --- a/source/session.js +++ b/source/session.js @@ -13,7 +13,10 @@ class Session { sessions.set(object.result, Date.now() + (1000 * 60 * 60)) return object.result } - Exists(x) {return sessions.has(x)} + Exists(x) { + sessions.set(x, Date.now() + (1000 * 60 * 60)) + return sessions.has(x) + } Expired() {sessions.forEach((value, key) => {if (Date.now() > value) sessions.delete(key)})} } -- cgit v1.2.3-70-g09d2