diff options
author | Paul Slaughter <pslaughter@gitlab.com> | 2019-01-17 00:57:50 +0300 |
---|---|---|
committer | Paul Slaughter <pslaughter@gitlab.com> | 2019-02-04 07:18:42 +0300 |
commit | d4e9dd96754324b8899330cd9e2cd480301d5b9c (patch) | |
tree | 1e39471e151f848a7d980baf88b6f60a672abcb1 /app/assets/javascripts/api.js | |
parent | 609e5f7db54c33e32d40b70f854c0f3469e5484c (diff) |
Add groupMembers to api.js
Diffstat (limited to 'app/assets/javascripts/api.js')
-rw-r--r-- | app/assets/javascripts/api.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js index d1396b6c4bc..85eb08cc97d 100644 --- a/app/assets/javascripts/api.js +++ b/app/assets/javascripts/api.js @@ -5,6 +5,7 @@ import axios from './lib/utils/axios_utils'; const Api = { groupsPath: '/api/:version/groups.json', groupPath: '/api/:version/groups/:id', + groupMembersPath: '/api/:version/groups/:id/members', subgroupsPath: '/api/:version/groups/:id/subgroups', namespacesPath: '/api/:version/namespaces.json', groupProjectsPath: '/api/:version/groups/:id/projects.json', @@ -40,6 +41,12 @@ const Api = { }); }, + groupMembers(id) { + const url = Api.buildUrl(this.groupMembersPath).replace(':id', encodeURIComponent(id)); + + return axios.get(url); + }, + // Return groups list. Filtered by query groups(query, options, callback = $.noop) { const url = Api.buildUrl(Api.groupsPath); |