MCPcopy
hub / github.com/tinyhttp/tinyhttp / reload

Method reload

packages/session/src/index.ts:145–153  ·  view source on GitHub ↗
(cb?: (err?: any) => void)

Source from the content-addressed store, hash-verified

143 }
144
145 reload(cb?: (err?: any) => void): this {
146 this.store.get(this.id, (err, sess) => {
147 if (err) return cb && cb(err)
148 if (!sess) return cb && cb(new Error('failed to load session'))
149 this.store.createSession(this.req, sess)
150 cb && cb(null)
151 })
152 return this
153 }
154
155 destroy(cb?: (err?: any) => void): this {
156 this.store.destroy(this.id, cb)

Callers 1

getSession.test.tsFile · 0.80

Calls 1

getMethod · 0.65

Tested by

no test coverage detected