mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-14 18:38:27 +00:00
adds dataset urn to id translation function
This commit is contained in:
parent
dee7f9d1d6
commit
f354ba05c5
@ -12,3 +12,12 @@ export const datasetsUrlRoot = `${ApiRoot}/datasets`;
|
|||||||
* @return {string} the dataset url
|
* @return {string} the dataset url
|
||||||
*/
|
*/
|
||||||
export const datasetUrlById = (id: number): string => `${datasetsUrlRoot}/${id}`;
|
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)}`;
|
||||||
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user