Class DriverShiftController

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

@RequestMapping("/api/drivershifts") @RestController public class DriverShiftController extends ApiController
  • Constructor Details

    • DriverShiftController

      public DriverShiftController()
  • Method Details

    • allDriverShifts

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

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_DRIVER\')") @PostMapping("/post") public DriverShift postDriverShift(@RequestParam String day, @RequestParam String startTime, @RequestParam String stopTime) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException