{"size": 641, "ext": "js", "max_stars_repo_path": "invenio_app_ils/ui/src/invenio_app_ils/common/api/urls.js", "max_stars_repo_name": "kpsherva/invenio-app-ils", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "invenio_app_ils/ui/src/invenio_app_ils/common/api/urls.js", "max_issues_repo_name": "kpsherva/invenio-app-ils", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "invenio_app_ils/ui/src/invenio_app_ils/common/api/urls.js", "max_forks_repo_name": "kpsherva/invenio-app-ils", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.8695652174, "max_line_length": 77, "alphanum_fraction": 0.7410296412}
import { generatePath } from 'react-router-dom';

const ApiBase = '/api';

export const ApiURLS = {
  locationList: `${ApiBase}/locations/`,
  locationItem: `${ApiBase}/locations/:locationPid`,
  internalLocationList: `${ApiBase}/internal-locations/`,
  internalLocationItem: `${ApiBase}/internal-locations/:internalLocationPid`,
};

export const locationItemUrl = locationPid => {
  return generatePath(ApiURLS.locationItem, {
    locationPid: locationPid,
  });
};

export const internalLocationItemUrl = internalLocationPid => {
  return generatePath(ApiURLS.internalLocationItem, {
    internalLocationPid: internalLocationPid,
  });
};
