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

Function getApplicants

src/Data/ApplicantData.js:7–25  ·  view source on GitHub ↗
(isRefresh = false, {priority = FOREGROUND_PRIORITY} = {})

Source from the content-addressed store, hash-verified

5import {deleteRecord, getRecordByApplicant, getRecordByRecordIDs, setRecord} from "./RecordData";
6
7export async function getApplicants(isRefresh = false, {priority = FOREGROUND_PRIORITY} = {}) {
8 /*
9 * Get the list of applicants from the server or local storage
10 * @param isRefresh [Boolean]: whether to refresh the data
11 * @return: list of applicants
12 */
13 return loadCachedValue({
14 key: "applicants",
15 legacyFields: ["data"],
16 forceRefresh: isRefresh,
17 priority,
18 load: async () => {
19 const applicants = await apiJson(APPLICANT_LIST, {
20 fetchPriority: priority,
21 });
22 return applicants.data;
23 },
24 });
25}
26
27export async function getApplicantIDByDisplayName(isRefresh = false) {
28 /*

Callers 6

loaderFunction · 0.90
toggleAnonymousFunction · 0.90
prefetchCoreCacheFunction · 0.90
getApplicantFunction · 0.85
setApplicantFunction · 0.85
removeApplicantFunction · 0.85

Calls 2

loadCachedValueFunction · 0.90
apiJsonFunction · 0.90

Tested by

no test coverage detected