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,