refactor(server): simplify Redis store saveSession()

This commit is contained in:
Damien Arrachequesne 2023-04-06 18:01:52 +02:00
parent 6ba21636d3
commit 9a00cea5b4
No known key found for this signature in database
GPG Key ID: 544D14663E7F7CF0
1 changed files with 6 additions and 6 deletions

View File

@ -62,12 +62,12 @@ export class RedisStore extends Store {
} }
saveSession(sessionId: string) { saveSession(sessionId: string) {
const key = this.computeKey(sessionId); this.redisClient.set(
this.redisClient this.computeKey(sessionId),
.multi() "1",
.set(key, true) "EX",
.expire(key, this.options.sessionDuration) "" + this.options.sessionDuration
.exec(); );
} }
} }