mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-26 10:43:36 -05:00
Abstract out Access List as shared component.
This commit is contained in:
40
src/api.js
40
src/api.js
@@ -66,10 +66,10 @@ class APIClient {
|
||||
return this.http.post(API_ORGANIZATIONS, data);
|
||||
}
|
||||
|
||||
getOrganzationAccessList (id) {
|
||||
getOrganzationAccessList (id, params = {}) {
|
||||
const endpoint = `${API_ORGANIZATIONS}${id}/access_list/`;
|
||||
|
||||
return this.http.get(endpoint);
|
||||
return this.http.get(endpoint, { params });
|
||||
}
|
||||
|
||||
getOrganizationDetails (id) {
|
||||
@@ -84,24 +84,6 @@ class APIClient {
|
||||
return this.http.get(endpoint, { params });
|
||||
}
|
||||
|
||||
getOrganizationUserRoles (id) {
|
||||
const endpoint = `${API_USERS}${id}/roles/`;
|
||||
|
||||
return this.http.get(endpoint);
|
||||
}
|
||||
|
||||
getUserTeams (id) {
|
||||
const endpoint = `${API_USERS}${id}/teams/`;
|
||||
|
||||
return this.http.get(endpoint);
|
||||
}
|
||||
|
||||
getTeamRoles (id) {
|
||||
const endpoint = `${API_TEAMS}${id}/roles/`;
|
||||
|
||||
return this.http.get(endpoint);
|
||||
}
|
||||
|
||||
getOrganizationNotifications (id, params = {}) {
|
||||
const endpoint = `${API_ORGANIZATIONS}${id}/notification_templates/`;
|
||||
|
||||
@@ -139,6 +121,24 @@ class APIClient {
|
||||
createInstanceGroups (url, id) {
|
||||
return this.http.post(url, { id });
|
||||
}
|
||||
|
||||
getUserRoles (id) {
|
||||
const endpoint = `${API_USERS}${id}/roles/`;
|
||||
|
||||
return this.http.get(endpoint);
|
||||
}
|
||||
|
||||
getUserTeams (id) {
|
||||
const endpoint = `${API_USERS}${id}/teams/`;
|
||||
|
||||
return this.http.get(endpoint);
|
||||
}
|
||||
|
||||
getTeamRoles (id) {
|
||||
const endpoint = `${API_TEAMS}${id}/roles/`;
|
||||
|
||||
return this.http.get(endpoint);
|
||||
}
|
||||
}
|
||||
|
||||
export default APIClient;
|
||||
|
||||
Reference in New Issue
Block a user