MCPcopy Create free account
hub / github.com/6174/comflowyspace / updateDocument

Method updateDocument

packages/common/jsondb/jsondb.client.ts:61–70  ·  view source on GitHub ↗

* Update a document * @param id * @param data * @returns

(id: string, data: Record<string, any>)

Source from the content-addressed store, hash-verified

59 * @returns
60 */
61 async updateDocument(id: string, data: Record<string, any>): Promise<JSONDBReponse> {
62 const response = await fetch(getBackendUrl(`/db/collection/${this.collectionName}/${id}`), {
63 method: 'PUT',
64 headers: {
65 'Content-Type': 'application/json',
66 },
67 body: JSON.stringify(data),
68 });
69 return response.json();
70 }
71
72 /**
73 *

Callers 2

updateDocMethod · 0.80
deleteDocSoftMethod · 0.80

Calls 1

getBackendUrlFunction · 0.90

Tested by

no test coverage detected