summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/api.js
diff options
context:
space:
mode:
authorPaul Slaughter <pslaughter@gitlab.com>2019-01-16 15:57:50 -0600
committerPaul Slaughter <pslaughter@gitlab.com>2019-02-03 22:18:42 -0600
commitd4e9dd96754324b8899330cd9e2cd480301d5b9c (patch)
tree1e39471e151f848a7d980baf88b6f60a672abcb1 /app/assets/javascripts/api.js
parent609e5f7db54c33e32d40b70f854c0f3469e5484c (diff)
downloadgitlab-ce-d4e9dd96754324b8899330cd9e2cd480301d5b9c.tar.gz
Add groupMembers to api.js
Diffstat (limited to 'app/assets/javascripts/api.js')
-rw-r--r--app/assets/javascripts/api.js7
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);