()
| 30 | // gets query string object and maps the value with corresponding key |
| 31 | // for (@QueryParam() id) returns { id: 45 } |
| 32 | getQueryParams(): any { |
| 33 | let queryParams = |
| 34 | this.controllerAction |
| 35 | .actionAttributes |
| 36 | .actionArguments |
| 37 | .map(x => x.isQueryParam ? x.key : null) |
| 38 | .filter(x => !DataUtility.isNull(x)); |
| 39 | |
| 40 | let queryString = {}; |
| 41 | |
| 42 | for (const queryParam of queryParams) { |
| 43 | // create new object, key = value |
| 44 | queryString[queryParam] = |
| 45 | this.controller.request.query[queryParam]; |
| 46 | } |
| 47 | |
| 48 | return queryString; |
| 49 | } |
| 50 | |
| 51 | // made public for unit-test, not available on contract |
| 52 | // maps url-segments and query-strings |
no outgoing calls
no test coverage detected