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

Function setPrograms

src/Data/ProgramData.js:208–217  ·  view source on GitHub ↗
(programs)

Source from the content-addressed store, hash-verified

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 }
210 */
211 const content = requestBody.content;
212 await apiRequest(ADD_MODIFY_PROGRAM, {
213 body: {
214 newProgram: requestBody.newProgram,
215 content,
216 },
217 });
218 await Promise.all([
219 removeCacheValue("programs"),
220 ...(content?.ProgramID ? [removeCacheValue(programDescCacheKey(content.ProgramID))] : []),

Callers 1

setProgramFunction · 0.85

Calls 1

writeCacheValueFunction · 0.90

Tested by

no test coverage detected