diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 21:09:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 21:09:07 +0300 |
commit | 6b8d671de726534a03c18e025a586e1bc9c04a4f (patch) | |
tree | f6a9168160b0d435641a1767b2e68487ec75ae46 /app/assets/javascripts/api.js | |
parent | 163a7046ac76eb4109184e82ce0af911633e6626 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/api.js')
-rw-r--r-- | app/assets/javascripts/api.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js index 4dc4ce543e9..8a6395b42b5 100644 --- a/app/assets/javascripts/api.js +++ b/app/assets/javascripts/api.js @@ -47,6 +47,7 @@ const Api = { adminStatisticsPath: '/api/:version/application/statistics', pipelineSinglePath: '/api/:version/projects/:id/pipelines/:pipeline_id', lsifPath: '/api/:version/projects/:id/commits/:commit_id/lsif/info', + environmentsPath: '/api/:version/projects/:id/environments', group(groupId, callback) { const url = Api.buildUrl(Api.groupPath).replace(':id', groupId); @@ -483,6 +484,11 @@ const Api = { return axios.get(url, { params: { path } }); }, + environments(id) { + const url = Api.buildUrl(this.environmentsPath).replace(':id', encodeURIComponent(id)); + return axios.get(url); + }, + buildUrl(url) { return joinPaths(gon.relative_url_root || '', url.replace(':version', gon.api_version)); }, |