From ead3c8ce1e440c037aae6b0b6be041bf475d9157 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Wed, 11 Nov 2020 18:15:23 +0100 Subject: [PATCH] Controller: wrap use() middlewares to handle async --- src/Controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller.ts b/src/Controller.ts index 93934c3..242eec8 100644 --- a/src/Controller.ts +++ b/src/Controller.ts @@ -75,7 +75,7 @@ export default abstract class Controller { } protected use(handler: RequestHandler): void { - this.router.use(handler); + this.router.use(this.wrap(handler)); } protected get(