Class RideRequestController

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

@RequestMapping("/api/riderequests") @RestController public class RideRequestController extends ApiController
  • Constructor Details

    • RideRequestController

      public RideRequestController()
  • Method Details

    • rideRequestsAdmin

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_DRIVER\')") @GetMapping("/all") public org.springframework.http.ResponseEntity<String> rideRequestsAdmin() throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • rideRequestsRider

      @PreAuthorize("hasRole(\'ROLE_RIDER\')") @GetMapping("/all_rider") public org.springframework.http.ResponseEntity<String> rideRequestsRider(@RequestParam Long userid) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • postRideRequest

      @PreAuthorize("hasRole(\'ROLE_RIDER\')") @PostMapping("/post") public RideRequest postRideRequest(@RequestParam Long userid, @RequestParam String day, @RequestParam String fullName, @RequestParam String course, @RequestParam String startTime, @RequestParam String stopTime, @RequestParam String building, @RequestParam String room, @RequestParam String pickup) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • deleteRideRequest_Admin

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_RIDER\')") @DeleteMapping("/delete") public Object deleteRideRequest_Admin(@RequestParam Long id)
    • updateRideRequest

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_RIDER\')") @PutMapping("/put") public RideRequest updateRideRequest(@RequestParam Long id, @RequestBody @Valid @Valid RideRequest incoming)