From d6ceb9152e4175ba3d3b5295eb8013055428b870 Mon Sep 17 00:00:00 2001 From: Sebastian Seedorf Date: Mon, 23 Nov 2020 22:57:38 +0100 Subject: [PATCH] Fixed get session by id --- out/session.js | 2 +- src/session.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/out/session.js b/out/session.js index 1094ae5..d90b2e9 100644 --- a/out/session.js +++ b/out/session.js @@ -30,7 +30,7 @@ function getRouter(options) { const sessionStore = req.sessionStore; if (sessionStore) { const getSession = util_1.promisify(sessionStore.get); - const session = yield getSession(sessionId); + const session = yield getSession.call(sessionStore, sessionId); if (session) { sessionStore.createSession(req, session); return true; // success diff --git a/src/session.ts b/src/session.ts index 32b2e61..12a2259 100644 --- a/src/session.ts +++ b/src/session.ts @@ -29,7 +29,7 @@ function getRouter(options?: Partial): RequestHandler { const sessionStore = (req as { sessionStore?: session.Store }).sessionStore; if (sessionStore) { const getSession = promisify(sessionStore.get); - const session = await getSession(sessionId); + const session = await getSession.call(sessionStore, sessionId); if (session) { sessionStore.createSession(req, session); return true; // success