Little ZabbixAPIService refactor.

This commit is contained in:
Alexander Zobnin
2016-01-31 11:11:56 +03:00
parent 006d74d3c5
commit a139131c26
2 changed files with 6 additions and 6 deletions

View File

@@ -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);
});
}
};