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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionpostRideRequest
(Long userid, String day, String fullName, String course, String startTime, String stopTime, String building, String room, String pickup) org.springframework.http.ResponseEntity<String>
org.springframework.http.ResponseEntity<String>
rideRequestsRider
(Long userid) updateRideRequest
(Long id, @Valid RideRequest incoming) Methods inherited from class edu.ucsb.cs156.gauchoride.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException
-
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
-
updateRideRequest
@PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_RIDER\')") @PutMapping("/put") public RideRequest updateRideRequest(@RequestParam Long id, @RequestBody @Valid @Valid RideRequest incoming)
-