Class RideController

java.lang.Object
edu.ucsb.cs156.gauchoride.controllers.ApiController
edu.ucsb.cs156.gauchoride.controllers.RideController

@RequestMapping("/api/ride_request") @RestController public class RideController extends ApiController
  • Constructor Details

    • RideController

      public RideController()
  • Method Details

    • allRides

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_DRIVER\') || hasRole(\'ROLE_USER\')") @GetMapping("/all") public Iterable<Ride> allRides()
    • getById

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_DRIVER\') || hasRole(\'ROLE_USER\')") @GetMapping("") public Ride getById(@RequestParam Long id)
    • postRide

      @PreAuthorize("hasRole(\'ROLE_USER\')") @PostMapping("/post") public Ride postRide(@RequestParam String day, @RequestParam String startTime, @RequestParam String endTime, @RequestParam String pickupLocation, @RequestParam String pickupRoom, @RequestParam String dropoffLocation, @RequestParam String dropoffRoom, @RequestParam String course, @RequestParam String notes)
    • deleteRide

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_DRIVER\') || hasRole(\'ROLE_USER\')") @DeleteMapping("") public Object deleteRide(@RequestParam Long id)
    • updateRide

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_DRIVER\') || hasRole(\'ROLE_USER\')") @PutMapping("") public Ride updateRide(@RequestParam Long id, @RequestBody @Valid @Valid Ride incoming)