adds dataset urn to id translation function

This commit is contained in:
Seyi Adebajo 2017-09-19 16:59:23 -07:00
parent dee7f9d1d6
commit f354ba05c5

View File

@ -12,3 +12,12 @@ export const datasetsUrlRoot = `${ApiRoot}/datasets`;
* @return {string} the dataset url
*/
export const datasetUrlById = (id: number): string => `${datasetsUrlRoot}/${id}`;
/**
* Constructs a url to get a dataset id given a dataset urn
* @param {string} urn
* @return {string}
*/
export const datasetIdTranslationUrlByUrn = (urn: string): string => {
return `${datasetsUrlRoot}/idfromurn/${encodeURIComponent(urn)}`;
};