Class RiderApplicationController

java.lang.Object
edu.ucsb.cs156.gauchoride.controllers.ApiController
edu.ucsb.cs156.gauchoride.controllers.RiderApplicationController

@RequestMapping("/api/riderapplication") @RestController public class RiderApplicationController extends ApiController
  • Constructor Details

    • RiderApplicationController

      public RiderApplicationController()
  • Method Details

    • newRiderApplication

      @PreAuthorize("hasRole(\'ROLE_MEMBER\')") @PostMapping("/new") public RiderApplication newRiderApplication(@RequestParam String perm_number, @RequestParam String description)
    • riderRequests

      @PreAuthorize("hasRole(\'ROLE_MEMBER\')") @GetMapping("/all") public org.springframework.http.ResponseEntity<String> riderRequests() throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • riderApplicationID

      @PreAuthorize("hasRole(\'ROLE_MEMBER\')") @GetMapping("/get") public RiderApplication riderApplicationID(@RequestParam Long id) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • updatePersonalApplication

      @PreAuthorize("hasRole(\'ROLE_MEMBER\')") @PutMapping("put") public RiderApplication updatePersonalApplication(@RequestParam long id, @RequestBody @Valid @Valid RiderApplication incoming)
    • cancelRiderApplication

      @PreAuthorize("hasRole(\'ROLE_MEMBER\')") @PutMapping("/cancel") public RiderApplication cancelRiderApplication(@RequestParam long id, @RequestBody @Valid @Valid RiderApplication incoming)
    • allRequests

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/admin/all") public org.springframework.http.ResponseEntity<String> allRequests() throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • allPendingRequests

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/admin/pending") public org.springframework.http.ResponseEntity<String> allPendingRequests() throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • riderApplicationId

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/admin/get") public RiderApplication riderApplicationId(@RequestParam Long id) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • editRiderApplication

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PutMapping("/admin") public RiderApplication editRiderApplication(@RequestParam long id, @RequestBody @Valid @Valid RiderApplication incoming)