Commit a27363e2 authored by Phil Hughes's avatar Phil Hughes

fixed approvers user endpoint

parent 558e92b3
......@@ -25,7 +25,7 @@ const Api = {
},
// Return groups list. Filtered by query
groups(query, options, callback) {
groups(query, options, callback = $.noop) {
const url = Api.buildUrl(Api.groupsPath);
return $.ajax({
url,
......@@ -149,6 +149,18 @@ const Api = {
});
},
approverUsers(search, options, callback = $.noop) {
const url = Api.buildUrl('/autocomplete/users.json');
return $.ajax({
url,
data: $.extend({
search,
per_page: 20,
}, options),
dataType: 'json',
}).done(callback);
},
ldap_groups(query, provider, callback) {
const url = Api.buildUrl(this.ldapGroupsPath).replace(':provider', provider);
return Api.wrapAjaxCall({
......
......@@ -46,7 +46,7 @@ export default class ApproversSelect {
skip_users: ApproversSelect.getApprovers(this.fieldNames[0], '.js-approver'),
project_id: $('#project_id').val(),
};
return Api.users(term, options);
return Api.approverUsers(term, options);
}
handleSelectChange(e) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment