mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
Refactor api.js into an api module where endpoint specific models can be imported and used in components.
21 lines
580 B
JavaScript
21 lines
580 B
JavaScript
import Base from '../Base';
|
|
import NotificationsMixin from '../mixins/Notifications.mixin';
|
|
import InstanceGroupsMixin from '../mixins/InstanceGroups.mixin';
|
|
|
|
class Organizations extends InstanceGroupsMixin(NotificationsMixin(Base)) {
|
|
constructor (http) {
|
|
super(http);
|
|
this.baseUrl = '/api/v2/organizations/';
|
|
}
|
|
|
|
readAccessList (id, params = {}) {
|
|
return this.http.get(`${this.baseUrl}${id}/access_list/`, { params });
|
|
}
|
|
|
|
readTeams (id, params = {}) {
|
|
return this.http.get(`${this.baseUrl}${id}/teams/`, { params });
|
|
}
|
|
}
|
|
|
|
export default Organizations;
|