diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-04 21:09:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-04 21:09:51 +0300 |
commit | bd979acf95124119d41f75d34cab231229f4dd81 (patch) | |
tree | a7ce5127c8ab6d42b27aa8342889c54d2f0090b2 /app/assets/javascripts/api | |
parent | 4bdfcf93f224edb9c4daff90d95b0c6c92766ea3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/api')
-rw-r--r-- | app/assets/javascripts/api/projects_api.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/assets/javascripts/api/projects_api.js b/app/assets/javascripts/api/projects_api.js index c72a913aacd..f69bb8ad7cb 100644 --- a/app/assets/javascripts/api/projects_api.js +++ b/app/assets/javascripts/api/projects_api.js @@ -8,6 +8,7 @@ const PROJECT_ALL_MEMBERS_PATH = '/api/:version/projects/:id/members/all'; const PROJECT_IMPORT_MEMBERS_PATH = '/api/:version/projects/:id/import_project_members/:project_id'; const PROJECT_REPOSITORY_SIZE_PATH = '/api/:version/projects/:id/repository_size'; const PROJECT_TRANSFER_LOCATIONS_PATH = 'api/:version/projects/:id/transfer_locations'; +const PROJECT_SHARE_LOCATIONS = 'api/:version/projects/:id/share_locations'; export function getProjects(query, options, callback = () => {}) { const url = buildApiUrl(PROJECTS_PATH); @@ -70,3 +71,10 @@ export const getProjectMembers = (projectId, inherited = false) => { return axios.get(url); }; + +export const getProjectShareLocations = (projectId, params = {}) => { + const url = buildApiUrl(PROJECT_SHARE_LOCATIONS).replace(':id', projectId); + const defaultParams = { per_page: DEFAULT_PER_PAGE }; + + return axios.get(url, { params: { ...defaultParams, ...params } }); +}; |