Commit 19afab7d authored by dietricf's avatar dietricf
Browse files

SI-382 Station service Controller angepasst

parent 6041120a
......@@ -21,9 +21,9 @@ import lombok.extern.log4j.Log4j2;
import org.eclipse.openk.gridfailureinformation.service.StationService;
import org.eclipse.openk.gridfailureinformation.viewmodel.StationDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.annotation.Secured;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
......@@ -36,17 +36,11 @@ public class StationController {
@Autowired
private StationService stationService;
//@Secured({"ROLE_GRID-FAILURE-ADMIN", "ROLE_GRID-FAILURE-CREATOR", "ROLE_GRID-FAILURE-QUALIFIER", "ROLE_GRID-FAILURE-PUBLISHER"})
@ApiOperation(value = "Anzeige Stationen nach Stationsnummer und Stationsname")
@Secured({"ROLE_GRID-FAILURE-ADMIN", "ROLE_GRID-FAILURE-CREATOR", "ROLE_GRID-FAILURE-QUALIFIER", "ROLE_GRID-FAILURE-PUBLISHER"})
@ApiOperation(value = "Anzeige aller Stationen")
@ApiResponses(value = {@ApiResponse(code = 200, message = "Erfolgreich durchgeführt")})
@GetMapping
public List<StationDto> findStations(
@RequestParam ("stationid") String stationid,
@RequestParam ("stationname") String stationname
) {
return stationService.getStationsByIdAndName(stationid, stationname);
public List<StationDto> findStations() {
return stationService.getStations();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment