Welcome to mirror list, hosted at ThFree Co, Russian Federation.

namespaces_api.js « api « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 166a95b749ae5271daa31a4adc1c925ed4c51a40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { buildApiUrl } from '~/api/api_utils';
import axios from '~/lib/utils/axios_utils';

const NAMESPACE_EXISTS_PATH = '/api/:version/namespaces/:id/exists';

export function getGroupPathAvailability(groupPath, parentId, axiosOptions = {}) {
  const url = buildApiUrl(NAMESPACE_EXISTS_PATH).replace(':id', encodeURIComponent(groupPath));

  return axios.get(url, {
    params: { parent_id: parentId, ...axiosOptions.params },
    ...axiosOptions,
  });
}