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

Function getRecordByProgram

src/Data/RecordData.js:41–47  ·  view source on GitHub ↗
(programId, isRefresh = false, options = {})

Source from the content-addressed store, hash-verified

39export async function getRecordByRecordIDs(recordIDs, isRefresh = false, {priority = FOREGROUND_PRIORITY} = {}) {
40 const uniqueRecordIDs = [...new Set(recordIDs)].filter(Boolean);
41 if (uniqueRecordIDs.length === 0) {
42 return {};
43 }
44 const records = await getRecords(isRefresh, {priority});
45 return Object.fromEntries(uniqueRecordIDs.flatMap((recordId) => (
46 isRecordData(records[recordId]) ? [[recordId, records[recordId]]] : []
47 )));
48}
49
50export async function getRecords(isRefresh = false, {priority = FOREGROUND_PRIORITY} = {}) {

Callers 2

loaderFunction · 0.90
actionFunction · 0.90

Calls 2

getProgramFunction · 0.90
getRecordByRecordIDsFunction · 0.85

Tested by

no test coverage detected