Skip to content

Commit

Permalink
refacotr: middlewareExecutor in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Sorikairox committed Mar 7, 2024
1 parent 88f7429 commit 012f2d0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/router/websocket/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 012f2d0

Please sign in to comment.