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 TypeMethodDescriptiondeleteDriverAvailability
(long id) getByIdAdmin
(Long id) postDriverAvailability
(String day, String startTime, String endTime, String notes) Methods inherited from class edu.ucsb.cs156.gauchoride.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException
-
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_DRIVER\')") @DeleteMapping("") public Object deleteDriverAvailability(@RequestParam long id) -
allUserDriverAvailabilities
@PreAuthorize("hasRole(\'ROLE_DRIVER\')") @GetMapping("") public Iterable<DriverAvailability> allUserDriverAvailabilities() -
getById
@PreAuthorize("hasRole(\'ROLE_DRIVER\')") @GetMapping("/id") public DriverAvailability getById(@RequestParam Long id)
-