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

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

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

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

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