implemented api to get all stations
This commit is contained in:
parent
ddf3bb3a5d
commit
73681073dd
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user