Class UsersController
java.lang.Object
edu.ucsb.cs156.gauchoride.controllers.ApiController
edu.ucsb.cs156.gauchoride.controllers.UsersController
@RequestMapping("/api/admin/users")
@RestController
public class UsersController
extends ApiController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionchangePronouns
(String pronouns) deleteUser_Admin
(Long id) org.springframework.http.ResponseEntity<String>
drivers()
org.springframework.http.ResponseEntity<String>
riders()
toggleAdmin
(Long id) toggleDriver
(Long id) toggleRider
(Long id) org.springframework.http.ResponseEntity<String>
users()
Methods inherited from class edu.ucsb.cs156.gauchoride.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException
-
Constructor Details
-
UsersController
public UsersController()
-
-
Method Details
-
users
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("") public org.springframework.http.ResponseEntity<String> users() throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
riders
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/riders") public org.springframework.http.ResponseEntity<String> riders() throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
drivers
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/drivers") public org.springframework.http.ResponseEntity<String> drivers() throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
users
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/get") public User users(@RequestParam Long id) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
deleteUser_Admin
-
toggleAdmin
-
toggleDriver
-
toggleRider
-
changePronouns
-
toggleWheelchair
@PreAuthorize("hasRole(\'ROLE_USER\')") @PostMapping("/toggleWheelchair") public Object toggleWheelchair()
-