(actionName: string)
| 186 | |
| 187 | // if controller action is async - invoke this |
| 188 | async invokeAsync(actionName: string): Promise<void> { |
| 189 | try { |
| 190 | let ctx = this.controller; |
| 191 | let values: IKeyValuePair[] = this.invokeSetUp(actionName); |
| 192 | |
| 193 | let result = values.length > 0 ? |
| 194 | await ctx[actionName].apply(ctx, values.map(val => val.value)) |
| 195 | : await ctx[actionName](); |
| 196 | this.attachResultToDino(this.controllerAction.actionAttributes.sendsResponse, result); |
| 197 | } catch (ex) { |
| 198 | this.controller.next(ex); |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | static create(controller: ApiController, |
| 203 | controllerAction: ControllerAction): DinoController { |
nothing calls this directly
no test coverage detected