diff --git a/package.json b/package.json index 98fb2bc..db7751d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@extollo/lib", - "version": "0.9.47", + "version": "0.9.48", "description": "The framework library that lifts up your code.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/http/routing/Route.ts b/src/http/routing/Route.ts index 0aa1908..79fdff9 100644 --- a/src/http/routing/Route.ts +++ b/src/http/routing/Route.ts @@ -1,4 +1,4 @@ -import {Awaitable, Collection, Either, ErrorWithContext, Maybe, Pipeline, PrefixTypeArray, right} from '../../util' +import {Awaitable, Collection, Either, ErrorWithContext, Maybe, Pipeline, SuffixTypeArray, right} from '../../util' import {ResponseFactory} from '../response/ResponseFactory' import {HTTPMethod, Request} from '../lifecycle/Request' import {constructable, Constructable, Container, Instantiable, isInstantiableOf, TypedDependencyKey} from '../../di' @@ -317,8 +317,8 @@ export class Route( handler: ParameterProvidingMiddleware | Instantiable>, ...handlerArgs: THandlerArgs - ): Route> { - const route = new Route>( + ): Route> { + const route = new Route>( this.method, this.route, ) @@ -409,7 +409,7 @@ export class Route(validator: ValidatorFactory): Route, THandlerParams>> { + public input(validator: ValidatorFactory): Route>> { if ( !(validator instanceof Validator) ) { validator = validator() } @@ -422,7 +422,7 @@ export class Route> { + public passingRequest(): Route> { return this.parameterMiddleware(request => right(request)) }