(accepts, modelClass)
| 478 | }; |
| 479 | |
| 480 | function setupOptionsArgs(accepts, modelClass) { |
| 481 | if (!Array.isArray(accepts)) |
| 482 | accepts = [accepts]; |
| 483 | |
| 484 | return accepts.map(function(arg) { |
| 485 | if (arg.http && arg.http === 'optionsFromRequest') { |
| 486 | // clone to preserve the input value |
| 487 | arg = extend({}, arg); |
| 488 | arg.http = createOptionsViaModelMethod.bind(modelClass); |
| 489 | } |
| 490 | return arg; |
| 491 | }); |
| 492 | } |
| 493 | |
| 494 | function createOptionsViaModelMethod(ctx) { |
| 495 | const ModelCtor = (ctx.method && ctx.method.ctor) || this; |
no outgoing calls
no test coverage detected
searching dependent graphs…