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 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)
    • deletemenuitem

      @PreAuthorize("hasRole(\'ROLE_DRIVER\')") @DeleteMapping("") public Object deletemenuitem(@RequestParam Long id)
    • 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
    • updatemenuitem

      @PreAuthorize("hasRole(\'ROLE_DRIVER\')") @PutMapping("") public DriverAvailability updatemenuitem(@RequestParam Long id, @RequestBody @Valid @Valid DriverAvailability incoming)
    • allmenuitems

      @PreAuthorize("hasRole(\'ROLE_DRIVER\')") @GetMapping("/all") public Iterable<DriverAvailability> allmenuitems()
    • getById

      @PreAuthorize("hasRole(\'ROLE_DRIVER\')") @GetMapping("") public DriverAvailability getById(@RequestParam Long id)