MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / processDelete

Method processDelete

packages/server/src/api/rest/index.ts:1788–1801  ·  view source on GitHub ↗
(client: ClientContract<Schema>, type: any, resourceId: string)

Source from the content-addressed store, hash-verified

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

Callers 1

handleRequestMethod · 0.95

Calls 3

getModelInfoMethod · 0.95
makeIdFilterMethod · 0.95

Tested by

no test coverage detected