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', [
'AgentPing',
function AgentPingService(AgentPing) {
var service = {};
import angular from 'angular';
service.ping = ping;
angular.module('portainer.agent').service('AgentPingService', AgentPingService);
function ping() {
return AgentPing.ping().$promise;
}
function AgentPingService(AgentPing) {
return { ping };
return service;
},
]);
function ping() {
return AgentPing.ping().$promise;
}
}