implemented api to get all stations

This commit is contained in:
Michael 2019-03-28 23:20:36 +01:00
parent ddf3bb3a5d
commit 73681073dd

View File

@ -195,4 +195,11 @@ public class Controller {
return false;
}
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
@RequestMapping("/api/getAllStations")
@ResponseBody
String getAllStations() {
return new Gson().toJson(stationRepository.findAll());
}
}