MCPcopy Create free account
hub / github.com/OpenSIST/OpenSIST.github.io / addComment

Function addComment

src/Data/PostData.js:142–150  ·  view source on GitHub ↗
(parentId, commentContent)

Source from the content-addressed store, hash-verified

140
141async function requestSuccessfulMutation(API, requestBody, action) {
142 const response = await apiRequest(API, {body: requestBody});
143 try {
144 const result = await response.json();
145 if (!result.success) {
146 throw new Error(result.error || `API request failed for ${action}.`);
147 }
148 } catch (error) {
149 if (error instanceof SyntaxError && response.ok) {
150 return;
151 }
152 throw error;
153 }

Callers 1

actionFunction · 0.90

Calls 2

Tested by

no test coverage detected