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

access_dropdown_api.js « api « settings « groups « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5560d10d17965145fff9a1d1d835984f69c23848 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import axios from '~/lib/utils/axios_utils';
import { joinPaths } from '~/lib/utils/url_utility';

const GROUP_SUBGROUPS_PATH = '/-/autocomplete/group_subgroups.json';

const buildUrl = (urlRoot, url) => {
  return joinPaths(urlRoot, url);
};

export const getSubGroups = () => {
  return axios.get(buildUrl(gon.relative_url_root || '', GROUP_SUBGROUPS_PATH), {
    params: {
      group_id: gon.current_group_id,
    },
  });
};