mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-26 10:43:36 -05:00
Refactor Access List.
- Derive Team Roles without making extra API call. - Consistent variable naming convention use camelCase. - More informative error display.
This commit is contained in:
13
src/api.js
13
src/api.js
@@ -6,7 +6,6 @@ const API_CONFIG = `${API_V2}config/`;
|
||||
const API_ORGANIZATIONS = `${API_V2}organizations/`;
|
||||
const API_INSTANCE_GROUPS = `${API_V2}instance_groups/`;
|
||||
const API_USERS = `${API_V2}users/`;
|
||||
const API_TEAMS = `${API_V2}teams/`;
|
||||
|
||||
const LOGIN_CONTENT_TYPE = 'application/x-www-form-urlencoded';
|
||||
|
||||
@@ -127,18 +126,6 @@ class APIClient {
|
||||
|
||||
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