Skip to content

Commit 5bc0b46

Browse files
authored
fix: remove unused async local storage middleware (#1817)
This middleware was made obsolete by e98b8d1.
1 parent 5573b96 commit 5bc0b46

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

__tests__/application/index.js

-5
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,4 @@ describe('app', () => {
9191
assert.deepStrictEqual(Koa.HttpError, CreateError.HttpError)
9292
assert.throws(() => { throw new CreateError(500, 'test error') }, Koa.HttpError)
9393
})
94-
95-
it('should export createAsyncCtxStorageMiddleware function', () => {
96-
const app = new Koa()
97-
assert.strictEqual(typeof app.createAsyncCtxStorageMiddleware, 'function')
98-
})
9994
})

lib/application.js

-9
Original file line numberDiff line numberDiff line change
@@ -248,15 +248,6 @@ module.exports = class Application extends Emitter {
248248
static get default () {
249249
return Application
250250
}
251-
252-
createAsyncCtxStorageMiddleware () {
253-
const app = this
254-
return async function asyncCtxStorage (ctx, next) {
255-
await app.ctxStorage.run(ctx, async () => {
256-
return await next()
257-
})
258-
}
259-
}
260251
}
261252

262253
/**

0 commit comments

Comments
 (0)