Class ShiftController

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

@RequestMapping("/api/shift") @RestController public class ShiftController extends ApiController
  • Constructor Details

    • ShiftController

      public ShiftController()
  • Method Details

    • allShifts

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

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_DRIVER\') || hasRole(\'ROLE_USER\')") @GetMapping("/get") public Shift shiftByID(@RequestParam Long id) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • postShift

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_DRIVER\')") @PostMapping("/post") public Shift postShift(@RequestParam String day, @RequestParam String shiftStart, @RequestParam String shiftEnd, @RequestParam long driverID, @RequestParam long driverBackupID)