adding get all waypoints
This commit is contained in:
@@ -19,6 +19,12 @@ public class WaypointController {
|
|||||||
this.waypointService = waypointService;
|
this.waypointService = waypointService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("")
|
||||||
|
public ResponseEntity<List<WaypointsEntity>> getAllWaypoints() {
|
||||||
|
List<WaypointsEntity> waypoint = waypointService.getAllWaypoints();
|
||||||
|
return new ResponseEntity<>(waypoint, HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/{location}")
|
@GetMapping("/{location}")
|
||||||
public ResponseEntity<List<WaypointsEntity>> getAllWaypoints(@PathVariable("location") String location) {
|
public ResponseEntity<List<WaypointsEntity>> getAllWaypoints(@PathVariable("location") String location) {
|
||||||
System.out.println(waypointService.getAllWaypointsByLocation(location));
|
System.out.println(waypointService.getAllWaypointsByLocation(location));
|
||||||
|
|||||||
Reference in New Issue
Block a user