Pass request to ParameterMiddleware make call

This commit is contained in:
Garrett Mills 2022-04-05 10:35:14 -05:00
parent ee21811771
commit 5fa4f614e2
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@extollo/lib", "name": "@extollo/lib",
"version": "0.9.25", "version": "0.9.26",
"description": "The framework library that lifts up your code.", "description": "The framework library that lifts up your code.",
"main": "lib/index.js", "main": "lib/index.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",

View File

@ -322,7 +322,7 @@ export class Route<TReturn extends ResponseObject, THandlerParams extends unknow
route.copyFrom(this) route.copyFrom(this)
if ( handler.prototype instanceof ParameterMiddleware ) { if ( handler.prototype instanceof ParameterMiddleware ) {
route.parameters.push(req => req.make<ParameterMiddleware<T, THandlerArgs>>(handler).handle(...handlerArgs)) route.parameters.push(req => req.make<ParameterMiddleware<T, THandlerArgs>>(handler, req).handle(...handlerArgs))
} }
route.parameters.push(handler as ParameterProvidingMiddleware<T>) route.parameters.push(handler as ParameterProvidingMiddleware<T>)