From 40a358ac786483f5729d890724b830caef37a2cc Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Wed, 5 May 2021 14:56:09 +0200 Subject: [PATCH] fix: an hour is 3600000 seconds not 60000 seconds --- src/lib/middleware/session-db.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/middleware/session-db.ts b/src/lib/middleware/session-db.ts index 3922b46542..e46dfbe7e2 100644 --- a/src/lib/middleware/session-db.ts +++ b/src/lib/middleware/session-db.ts @@ -5,13 +5,14 @@ const session = require('express-session'); const KnexSessionStore = require('connect-session-knex')(session); const TWO_DAYS = 48 * 60 * 60 * 1000; +const HOUR = 60 * 60 * 1000; function sessionDb( config: Pick, stores: Pick, ): any { let store; const { db } = config.session; - const age = config.session.ttlHours * 60000 || TWO_DAYS; + const age = config.session.ttlHours * HOUR || TWO_DAYS; if (db) { store = new KnexSessionStore({ knex: stores.db,