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

Function getProgramContent

src/Data/ProgramData.js:196–206  ·  view source on GitHub ↗
(programId, isRefresh = false)

Source from the content-addressed store, hash-verified

194export async function getProgramContent(programId, isRefresh = false) {
195 /*
196 * Get the program (with description) from the server or local storage by programId
197 * @param programId [String]: programId
198 * @param isRefresh [Boolean]: whether to refresh the data
199 * @return: program (with description)
200 */
201 const program = await getProgram(programId, isRefresh);
202 const programDesc = await getProgramDesc(programId, isRefresh);
203 return {...program, 'description': programDesc};
204}
205
206export async function addModifyProgram(requestBody) {
207 /*
208 * Post program creation/update to the server and invalidate local program caches.
209 * @param requestBody [Object]: { newProgram: Boolean, content: Object }

Callers 1

loaderFunction · 0.90

Calls 2

getProgramFunction · 0.85
getProgramDescFunction · 0.85

Tested by

no test coverage detected