Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function getOnlineResources({ cmrMetadataFormat, cmrConceptId, cmrLink }) {
if (cmrMetadataFormat === 'echo10') {
return getOnlineResourcesECHO10(cmrLink);
}
if (isUMMGMetadataFormat(cmrMetadataFormat)) {
return getOnlineResourcesUMMG(`${getUrl('search')}granules.umm_json?concept_id=${cmrConceptId}`);
}
throw new Error(`Invalid cmrMetadataFormat passed to getOnlineResources: ${cmrMetadataFormat}}`);
}