Class RiderApplicationController
java.lang.Object
edu.ucsb.cs156.gauchoride.controllers.ApiController
edu.ucsb.cs156.gauchoride.controllers.RiderApplicationController
@RequestMapping("/api")
@RestController
public class RiderApplicationController
extends ApiController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionpostRiderApplication
(String perm_number, String description) org.springframework.http.ResponseEntity<Object>
updateApplication
(Long id, @Valid RiderApplication incoming) updateApplicationAdmin
(Long id, String status, String notes) Methods inherited from class edu.ucsb.cs156.gauchoride.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException
-
Constructor Details
-
RiderApplicationController
public RiderApplicationController()
-
-
Method Details
-
postRiderApplication
@PreAuthorize("hasRole(\'ROLE_MEMBER\')") @PostMapping("/riderApplication/new") public RiderApplication postRiderApplication(@RequestParam String perm_number, @RequestParam String description) -
allApplications
@PreAuthorize("hasRole(\'ROLE_MEMBER\')") @GetMapping("/rider") public Iterable<RiderApplication> allApplications() -
getById
@PreAuthorize("hasRole(\'ROLE_MEMBER\')") @GetMapping("/riderApplication") public RiderApplication getById(@RequestParam Long id) -
updateApplication
@PreAuthorize("hasRole(\'ROLE_MEMBER\')") @PutMapping("/riderApplication") public org.springframework.http.ResponseEntity<Object> updateApplication(@RequestParam Long id, @RequestBody @Valid @Valid RiderApplication incoming) -
cancelApplication
-
allApplicationsAdmin
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/rider/admin/all") public Iterable<RiderApplication> allApplicationsAdmin() -
allPendingApplications
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/rider/admin/pending") public Iterable<RiderApplication> allPendingApplications() -
specificApplication
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/rider/admin") public RiderApplication specificApplication(@RequestParam Long id) -
updateApplicationAdmin
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PutMapping("/rider/admin") public RiderApplication updateApplicationAdmin(@RequestParam Long id, @RequestParam String status, @RequestParam String notes)
-