From 012f2d02645e8ebb1cbb6eeb8e2349fe68730f14 Mon Sep 17 00:00:00 2001 From: Thomas Cruveilher <38007824+Sorikairox@users.noreply.github.com> Date: Thu, 7 Mar 2024 12:59:24 +0000 Subject: [PATCH] refacotr: middlewareExecutor in constructor --- src/router/websocket/router.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/router/websocket/router.ts b/src/router/websocket/router.ts index c8e3362b..79019c9c 100644 --- a/src/router/websocket/router.ts +++ b/src/router/websocket/router.ts @@ -24,17 +24,13 @@ import { import { resolveMethodParam } from '../controller/params/resolver.ts'; export class WebSocketRouter { - private middlewareExecutor: MiddlewareExecutor; constructor( private injector: Injector, private guardExecutor: GuardExecutor = new GuardExecutor(injector), private filterExecutor: FilterExecutor = new FilterExecutor(injector), private router: Application, - ) { - this.middlewareExecutor = new MiddlewareExecutor( - injector, - ); - } + private middlewareExecutor = new MiddlewareExecutor(injector), + ) {} public registerController(Controller: Constructor, endpoint: string) { endpoint = trimSlash(endpoint);