From b5bfe9c92e75f80fcad25ea0ce65ef9e45d13a8c Mon Sep 17 00:00:00 2001 From: "michal.banka" Date: Wed, 26 Jun 2019 11:05:13 +0200 Subject: Add controller which create error reports Change-Id: Icfba59e90420c0d849c9ba5fae3d0cb1b40ed265 Issue-ID: VID-488 Signed-off-by: michal.banka --- .../src/main/java/org/onap/vid/controller/ProbeController.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java') 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 probes; + final private ProbeService probeService; @Autowired - public ProbeController(List probes) { - this.probes = probes; + public ProbeController(ProbeService probeService) { + this.probeService = probeService; } @GetMapping public List getProbe() { - return probes.stream().map(ProbeInterface::probeComponent).collect(Collectors.toList()); + return probeService.getProbe(); } } -- cgit 1.2.3-korg