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 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

      @PreAuthorize("hasRole(\'ROLE_MEMBER\')") @PutMapping("/riderApplication/cancel") public Object cancelApplication(@RequestParam Long id)
    • 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)