MCPcopy Index your code
hub / github.com/OpenSIST/OpenSIST.github.io / removeFile

Function removeFile

src/Data/FileData.js:56–63  ·  view source on GitHub ↗
(fileId, author)

Source from the content-addressed store, hash-verified

54}
55
56export async function removeFile(fileId, author) {
57 await apiRequest(REMOVE_FILE, {body: {PostID: fileId}});
58 const applicant = await getApplicant(author);
59 await setApplicant({
60 ...applicant,
61 Posts: applicant.Posts.filter((post) => post.toString() !== fileId.toString()),
62 });
63}

Callers 1

syncApplicantFileFunction · 0.90

Calls 3

apiRequestFunction · 0.90
getApplicantFunction · 0.90
setApplicantFunction · 0.90

Tested by

no test coverage detected