Class AdminUserManagementController
java.lang.Object
io.github.navjotsrakhra.eventmanager.controller.AdminUserManagementController
The AdminUserManagementController class handles HTTP requests related to user management in the admin panel.
-
Constructor Summary
ConstructorsConstructorDescriptionAdminUserManagementController(UserManagementService userManagementService) Constructor for the AdminUserManagementController class. -
Method Summary
Modifier and TypeMethodDescriptiongetUsers()Handles GET requests for the "/admin/users" URL and retrieves a list of all users.org.springframework.http.ResponseEntity<Boolean> updateUserRole(Long id, List<Role> updatedRoles) Handles POST requests for the "/admin/updateUserRole/{id}" URL to update user roles.
-
Constructor Details
-
Method Details
-
getUsers
Handles GET requests for the "/admin/users" URL and retrieves a list of all users.- Returns:
- ResponseEntity containing a list of UserDTO objects.
-
updateUserRole
@PostMapping("/updateUserRole/{id}") public org.springframework.http.ResponseEntity<Boolean> updateUserRole(@PathVariable Long id, @RequestBody List<Role> updatedRoles) Handles POST requests for the "/admin/updateUserRole/{id}" URL to update user roles.- Parameters:
id- The ID of the user whose roles need to be updated.updatedRoles- The list of updated roles for the user.- Returns:
- ResponseEntity indicating the result of the operation.
-