diff --git a/src/decorators/Controller.ts b/src/decorators/Controller.ts index e7b4197..fcab684 100644 --- a/src/decorators/Controller.ts +++ b/src/decorators/Controller.ts @@ -77,7 +77,7 @@ export function Controller() // If `fn` is the two parameter variant force it to be a three parameter variant // This is because of how error handling is done in the framework (based on how Express does it) if(fn.length === 2) { - fn = (req: Request, res: Response, next: NextFunction) => fn(req, res, next); + fn = (req: Request, res: Response, next: NextFunction) => target.prototype[method](req, res, next); } // Get the path