Little ZabbixAPIService refactor.
This commit is contained in:
@@ -32,7 +32,7 @@ function (angular, _) {
|
||||
p.request = function(method, params) {
|
||||
var self = this;
|
||||
if (this.auth) {
|
||||
return ZabbixAPIService._request(this.url, method, params, this.requestOptions, this.auth)
|
||||
return ZabbixAPIService.request(this.url, method, params, this.requestOptions, this.auth)
|
||||
.then(function(result) {
|
||||
return result;
|
||||
},
|
||||
@@ -43,7 +43,7 @@ function (angular, _) {
|
||||
return ZabbixAPIService.login(self.url, self.username, self.password, self.requestOptions)
|
||||
.then(function(auth) {
|
||||
self.auth = auth;
|
||||
return ZabbixAPIService._request(self.url, method, params, self.requestOptions, self.auth);
|
||||
return ZabbixAPIService.request(self.url, method, params, self.requestOptions, self.auth);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -53,7 +53,7 @@ function (angular, _) {
|
||||
return ZabbixAPIService.login(this.url, this.username, this.password, this.requestOptions)
|
||||
.then(function(auth) {
|
||||
self.auth = auth;
|
||||
return ZabbixAPIService._request(self.url, method, params, self.requestOptions, self.auth);
|
||||
return ZabbixAPIService.request(self.url, method, params, self.requestOptions, self.auth);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user