refactor(role): refactor role management API and service
- Remove unused imports and simplify controller annotations - Change request mapping path from /api/role to /api/roles - Update assignRolesToUser endpoint to use POST /users - Update revokeRolesFromUser endpoint to use DELETE /users - Modify getAllRoles method to return OptionResponse instead of RoleResponse - Simplify database query in RoleServiceImpl using lambda query wrapper - Add proper authorization checks for all role management endpoints - Remove redundant getUserRole method with duplicate logic
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package cn.nopj.chaos_api.service;
|
||||
|
||||
import cn.nopj.chaos_api.dto.response.OptionResponse;
|
||||
import cn.nopj.chaos_api.dto.response.RoleResponse;
|
||||
|
||||
import java.util.List;
|
||||
@@ -9,5 +10,5 @@ public interface RoleService {
|
||||
* 获取所有角色
|
||||
* @return 所有角色
|
||||
*/
|
||||
List<RoleResponse> getAllRoles();
|
||||
List<OptionResponse> getAllRoles();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user