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

Function getRecordByRecordIDs

src/Data/RecordData.js:49–58  ·  view source on GitHub ↗
(recordIDs, isRefresh = false, {priority = FOREGROUND_PRIORITY} = {})

Source from the content-addressed store, hash-verified

47}
48
49export async function getRecordByRecordIDs(recordIDs, isRefresh = false, {priority = FOREGROUND_PRIORITY} = {}) {
50 const uniqueRecordIDs = [...new Set(recordIDs)].filter(Boolean);
51 if (uniqueRecordIDs.length === 0) {
52 return {};
53 }
54 const records = await getRecords(isRefresh, {priority});
55 return Object.fromEntries(uniqueRecordIDs.flatMap((recordId) => (
56 isRecordData(records[recordId]) ? [[recordId, records[recordId]]] : []
57 )));
58}
59
60export async function getRecords(isRefresh = false, {priority = FOREGROUND_PRIORITY} = {}) {
61 return await loadCachedValue({

Callers 5

getAllRecordsFunction · 0.90
loaderFunction · 0.90
setApplicantFunction · 0.90
getRecordByApplicantFunction · 0.85
getRecordByProgramFunction · 0.85

Calls 2

getRecordsFunction · 0.85
isRecordDataFunction · 0.85

Tested by

no test coverage detected