summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/session.js5
1 files changed, 4 insertions, 1 deletions
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)})}
}