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

    • allAvailabilities

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

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

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_DRIVER\')") @PostMapping("/new") public DriverAvailability postAvailability(@RequestParam String day, @RequestParam String startTime, @RequestParam String endTime, @RequestParam String notes)
    • deleteAvailability

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_DRIVER\')") @DeleteMapping("") public Object deleteAvailability(@RequestParam Long id)
    • updateAvailability

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_DRIVER\')") @PutMapping("") public DriverAvailability updateAvailability(@RequestParam Long id, @RequestBody @Valid @Valid DriverAvailability incoming)