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 long driverId, @RequestParam String day, @RequestParam String startTime, @RequestParam String endTime, @RequestParam String notes) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • allApplications

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

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

      @PreAuthorize("hasRole(\'ROLE_DRIVER\')") @PutMapping("") public org.springframework.http.ResponseEntity<Object> updateDriverAvailability(@RequestParam Long id, @RequestBody @Valid @Valid DriverAvailability incoming)
    • deleteDriverAvailability

      @PreAuthorize("hasRole(\'ROLE_DRIVER\')") @DeleteMapping("") public Object deleteDriverAvailability(@RequestParam Long id)
    • adminGetById

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

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