MCPcopy
hub / github.com/tinyhttp/tinyhttp / load

Function load

packages/session/src/index.ts:186–197  ·  view source on GitHub ↗
(id: string, cb: (err: any, session?: Express.SessionData | null) => any)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

getMethod · 0.65

Tested by

no test coverage detected