Class RideController

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

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

    • RideController

      public RideController()
  • Method Details

    • postRides

      @PreAuthorize("hasRole(\'ROLE_RIDER\')") @PostMapping("/post") public Ride postRides(@RequestBody @Valid @Valid Ride ride) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • getById

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("") public Ride getById(@RequestParam Long id)