Fix left() response handling for parameter middleware
This commit is contained in:
parent
0484a586bd
commit
2d9f22b895
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@extollo/lib",
|
"name": "@extollo/lib",
|
||||||
"version": "0.14.7",
|
"version": "0.14.8",
|
||||||
"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",
|
||||||
|
@ -35,11 +35,13 @@ export class ExecuteResolvedRoutePreflightHTTPModule extends AbstractResolvedRou
|
|||||||
}
|
}
|
||||||
|
|
||||||
const parameters = route.parameters
|
const parameters = route.parameters
|
||||||
const resolveResult = await collect(parameters)
|
const resolveResult = (await collect(parameters)
|
||||||
.asyncMapRight(handler => handler(request))
|
.asyncMapRight(handler => handler(request)))
|
||||||
|
|
||||||
if ( isLeft(resolveResult) ) {
|
if ( isLeft(resolveResult) ) {
|
||||||
return unleft(resolveResult)
|
await this.applyResponseObject(unleft(resolveResult), request)
|
||||||
|
request.response.blockingWriteback(true)
|
||||||
|
return request
|
||||||
}
|
}
|
||||||
|
|
||||||
route.resolvedParameters = unright(resolveResult).toArray(false)
|
route.resolvedParameters = unright(resolveResult).toArray(false)
|
||||||
|
Loading…
Reference in New Issue
Block a user