Class IndividualRidesController
java.lang.Object
edu.ucsb.cs156.gauchoride.controllers.ApiController
edu.ucsb.cs156.gauchoride.controllers.IndividualRidesController
@RequestMapping("/api/individualRides")
@RestController
public class IndividualRidesController
extends ApiController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeleteRide
(Long id) postIndividualRide
(Long driverId, Long riderId, String startTimeString, String endTimeString, String pickupLocation, String dropoffLocation) updateIndividualRide
(Long id, @Valid IndividualRides incoming) Methods inherited from class edu.ucsb.cs156.gauchoride.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException
-
Constructor Details
-
IndividualRidesController
public IndividualRidesController()
-
-
Method Details
-
allIndividualRides
@PreAuthorize("hasRole(\'ROLE_DRIVER\') || hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_RIDER\')") @GetMapping("/all") public Iterable<IndividualRides> allIndividualRides() -
allIndividualRidesWithDriverId
@PreAuthorize("hasRole(\'ROLE_DRIVER\') || hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_RIDER\')") @GetMapping("/allWithDriverId") public Iterable<IndividualRides> allIndividualRidesWithDriverId(@RequestParam Long id) -
allIndividualRidesWithRiderId
@PreAuthorize("hasRole(\'ROLE_DRIVER\') || hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_RIDER\')") @GetMapping("/allWithRiderId") public Iterable<IndividualRides> allIndividualRidesWithRiderId(@RequestParam Long id) -
getById
@PreAuthorize("hasRole(\'ROLE_DRIVER\') || hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_RIDER\')") @GetMapping("") public IndividualRides getById(@RequestParam Long id) -
deleteRide
-
updateIndividualRide
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PutMapping("") public IndividualRides updateIndividualRide(@RequestParam Long id, @RequestBody @Valid @Valid IndividualRides incoming) -
postIndividualRide
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public IndividualRides postIndividualRide(@RequestParam Long driverId, @RequestParam Long riderId, @RequestParam String startTimeString, @RequestParam String endTimeString, @RequestParam String pickupLocation, @RequestParam String dropoffLocation)
-