diff options
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java b/vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java index c181c6f30..26a8add6a 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java @@ -22,27 +22,27 @@ package org.onap.vid.controller; import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.onap.vid.model.probes.ExternalComponentStatus; +import org.onap.vid.services.ProbeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; -import java.util.stream.Collectors; @RestController @RequestMapping("probe") public class ProbeController extends RestrictedBaseController { - private final List<ProbeInterface> probes; + final private ProbeService probeService; @Autowired - public ProbeController(List<ProbeInterface> probes) { - this.probes = probes; + public ProbeController(ProbeService probeService) { + this.probeService = probeService; } @GetMapping public List<ExternalComponentStatus> getProbe() { - return probes.stream().map(ProbeInterface::probeComponent).collect(Collectors.toList()); + return probeService.getProbe(); } } |