(isRefresh = false, {priority = FOREGROUND_PRIORITY} = {})
| 5 | import {deleteRecord, getRecordByApplicant, getRecordByRecordIDs, setRecord} from "./RecordData"; |
| 6 | |
| 7 | export 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 | |
| 27 | export async function getApplicantIDByDisplayName(isRefresh = false) { |
| 28 | /* |
no test coverage detected