refactor(agent): refactor pingService to es6 (#4093)

related to #4071
pull/4098/head
Chaim Lev-Ari 2020-07-23 10:43:37 +03:00 committed by GitHub
parent b50497301d
commit 5abd35d4c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 11 deletions

View File

@ -1,14 +1,11 @@
angular.module('portainer.agent').service('AgentPingService', [ import angular from 'angular';
'AgentPing',
function AgentPingService(AgentPing) {
var service = {};
service.ping = ping; angular.module('portainer.agent').service('AgentPingService', AgentPingService);
function AgentPingService(AgentPing) {
return { ping };
function ping() { function ping() {
return AgentPing.ping().$promise; return AgentPing.ping().$promise;
} }
}
return service;
},
]);