(id: string, cb: (err: any, session?: Express.SessionData | null) => any)
| 184 | } |
| 185 | |
| 186 | load(id: string, cb: (err: any, session?: Express.SessionData | null) => any) { |
| 187 | this.get(id, (err, session) => { |
| 188 | if (err) return cb(err) |
| 189 | if (!session) return cb(null) |
| 190 | const req = { |
| 191 | sessionID: id, |
| 192 | sessionStore: this |
| 193 | } |
| 194 | |
| 195 | cb(null, this.createSession(req, session)) |
| 196 | }) |
| 197 | } |
| 198 | |
| 199 | createSession(req: any, session: any) { |
| 200 | const expires = session.cookie && session.cookie.expires |