(programId, isRefresh = false)
| 194 | export 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 | |
| 206 | export 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 } |
no test coverage detected