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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String>
postDriverShift
(String day, String startTime, String stopTime) Methods inherited from class edu.ucsb.cs156.gauchoride.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException
-
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
-