(client: ClientContract<Schema>, type: any, resourceId: string)
| 1786 | } |
| 1787 | |
| 1788 | private async processDelete(client: ClientContract<Schema>, type: any, resourceId: string): Promise<Response> { |
| 1789 | const typeInfo = this.getModelInfo(type); |
| 1790 | if (!typeInfo) { |
| 1791 | return this.makeUnsupportedModelError(type); |
| 1792 | } |
| 1793 | |
| 1794 | await (client as any)[type].delete({ |
| 1795 | where: this.makeIdFilter(typeInfo.idFields, resourceId), |
| 1796 | }); |
| 1797 | return { |
| 1798 | status: 200, |
| 1799 | body: { meta: {} }, |
| 1800 | }; |
| 1801 | } |
| 1802 | |
| 1803 | //#region utilities |
| 1804 |
no test coverage detected