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

Function collectProgram

src/Data/UserData.js:397–405  ·  view source on GitHub ↗
(programID)

Source from the content-addressed store, hash-verified

395}
396
397export async function collectProgram(programID) {
398 await apiRequest(COLLECT_PROGRAM, {body: {ProgramID: programID}});
399
400 const metadata = await getMetadata();
401 await setMetadata({
402 ...metadata,
403 ProgramCollection: [...new Set([...(metadata.ProgramCollection ?? []), programID])],
404 });
405}
406
407export async function uncollectProgram(programID) {
408 await apiRequest(UNCOLLECT_PROGRAM, {body: {ProgramID: programID}});

Callers 2

actionFunction · 0.90
actionFunction · 0.90

Calls 3

apiRequestFunction · 0.90
getMetadataFunction · 0.85
setMetadataFunction · 0.85

Tested by

no test coverage detected