(requestedObject: string, validObjects: string[])
| 62 | } |
| 63 | |
| 64 | private validateObject(requestedObject: string, validObjects: string[]): boolean { |
| 65 | if (!validObjects.includes(requestedObject.toLowerCase())) { |
| 66 | this.processResponse( |
| 67 | Response.badRequest( |
| 68 | 'Unknown object "' + |
| 69 | requestedObject + |
| 70 | '". Allowed objects are: ' + |
| 71 | validObjects.join(", ") + |
| 72 | ".", |
| 73 | ), |
| 74 | ); |
| 75 | return false; |
| 76 | } |
| 77 | return true; |
| 78 | } |
| 79 | } |
no test coverage detected