mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-24 18:10:11 +00:00
15 lines
408 B
TypeScript
15 lines
408 B
TypeScript
import { getApiRoot } from 'wherehows-web/utils/api/shared';
|
|
|
|
/**
|
|
* Defines the endpoint for datasets
|
|
* @type {string}
|
|
*/
|
|
export const datasetsUrlRoot = `${getApiRoot()}/datasets`;
|
|
|
|
/**
|
|
* Constructs a url to get a dataset with a given id
|
|
* @param {number} id the id of the dataset
|
|
* @return {string} the dataset url
|
|
*/
|
|
export const datasetUrlById = (id: number): string => `${datasetsUrlRoot}/${id}`;
|