Class AdminController
java.lang.Object
edu.ucsb.cs156.dining.controllers.ApiController
edu.ucsb.cs156.dining.controllers.AdminController
This is a REST controller for Admin
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList all adminsdeleteAdmin(String email) Delete an AdminCreate a new adminMethods inherited from class ApiController
genericMessage, getCurrentUser, handleGenericException, handleUnsupportedOperation
-
Constructor Details
-
AdminController
public AdminController()
-
-
Method Details
-
postAdmin
-
allAdmins
@PreAuthorize("hasRole('ROLE_ADMIN')") @GetMapping("/all") public Iterable<AdminController.AdminDTO> allAdmins()List all admins- Returns:
- an iterable of Admin
-
deleteAdmin
-
handleIllegalArgumentException
@ExceptionHandler(IllegalArgumentException.class) public org.springframework.http.ResponseEntity<Map<String,String>> handleIllegalArgumentException(IllegalArgumentException ex)
-