Class DriverAvailabilityController
java.lang.Object
edu.ucsb.cs156.gauchoride.controllers.ApiController
edu.ucsb.cs156.gauchoride.controllers.DriverAvailabilityController
@RequestMapping("/api/driverAvailability")
@RestController
public class DriverAvailabilityController
extends ApiController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String>
deletemenuitem
(Long id) postDriverAvailability
(String day, String startTime, String endTime, String notes) updatemenuitem
(Long id, @Valid DriverAvailability incoming) Methods inherited from class edu.ucsb.cs156.gauchoride.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException
-
Constructor Details
-
DriverAvailabilityController
public DriverAvailabilityController()
-
-
Method Details
-
postDriverAvailability
@PreAuthorize("hasRole(\'ROLE_DRIVER\')") @PostMapping("/new") public DriverAvailability postDriverAvailability(@RequestParam String day, @RequestParam String startTime, @RequestParam String endTime, @RequestParam String notes) -
allDriverAvailabilities
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/admin/all") public org.springframework.http.ResponseEntity<String> allDriverAvailabilities() throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
driverAvailabilityByID
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/admin") public DriverAvailability driverAvailabilityByID(@RequestParam Long id) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getById
@PreAuthorize("hasRole(\'ROLE_DRIVER\')") @GetMapping("") public DriverAvailability getById(@RequestParam Long id)
-