diff --git a/app/agent/services/pingService.js b/app/agent/services/pingService.js index cc3133f22..bd6380912 100644 --- a/app/agent/services/pingService.js +++ b/app/agent/services/pingService.js @@ -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; + } +}