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

    • allDriverAvailabilitys

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("admin/all") public Iterable<DriverAvailability> allDriverAvailabilitys()
    • getByIdAdmin

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("admin") public DriverAvailability getByIdAdmin(@RequestParam Long id)
    • postDriverAvailability

      @PreAuthorize("hasRole(\'ROLE_DRIVER\')") @PostMapping("/post") public DriverAvailability postDriverAvailability(@RequestParam String day, @RequestParam String startTime, @RequestParam String endTime, @RequestParam String notes)
    • deleteDriverAvailability

      @PreAuthorize("hasRole(\'ROLE_USER\')") @DeleteMapping("") public Object deleteDriverAvailability(@RequestParam long id)
    • allUserDriverAvailabilities

      @PreAuthorize("hasRole(\'ROLE_DRIVER\')") @GetMapping("") public Iterable<DriverAvailability> allUserDriverAvailabilities()