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}
141
142export async function addComment(parentId, commentContent) {
143 assertPostContentWithinLimit(commentContent);
144 const requestBody = {
145 parentId: parentId.toString(),
146 content: commentContent,
147 };
148
149 await requestSuccessfulMutation(CREATE_COMMENT_API, requestBody, 'creating comment');
150}
151
152async function requestSuccessfulMutation(API, requestBody, action) {
153 const response = await apiRequest(API, {body: requestBody});

Callers 1

actionFunction · 0.90

Calls 2

Tested by

no test coverage detected