MCPcopy Create free account
hub / github.com/ParallelTask/dinoloop / invokeAsync

Method invokeAsync

src/modules/core/dino.controller.ts:188–200  ·  view source on GitHub ↗
(actionName: string)

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 2

invokeSetUpMethod · 0.95
attachResultToDinoMethod · 0.95

Tested by

no test coverage detected