refactor 优化代码
This commit is contained in:
@@ -30,9 +30,9 @@ public class MenusController : ControllerBase
|
||||
/// <param name="platform">菜单平台类型 PlatformEnumType</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
public async Task<List<MenuResponse>> GetListAsync([EnumDataType(typeof(PlatformEnumType))] PlatformEnumType? platform = PlatformEnumType.PCAdmin)
|
||||
public async Task<List<MenuResponse>> GetListAsync([EnumDataType(typeof(PlatformEnumType))] PlatformEnumType platform = PlatformEnumType.PCAdmin)
|
||||
{
|
||||
return await _menuService.GetListAsync(platform.Value);
|
||||
return await _menuService.GetListAsync(platform);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -53,7 +53,6 @@ public class MenusController : ControllerBase
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[Authorize(Roles = "admin,tenant-admin")]
|
||||
[HttpPost("assign")]
|
||||
public async Task AssignmentAsync(MenuPermissionAssignmentRequest request)
|
||||
{
|
||||
@@ -66,7 +65,6 @@ public class MenusController : ControllerBase
|
||||
/// <param name="uniqueType">权限分配类型 AssignTypeEnumType</param>
|
||||
/// <param name="uniqueValue">类型对应的唯一值</param>
|
||||
/// <returns></returns>
|
||||
[Authorize(Roles = "admin,tenant-admin")]
|
||||
[HttpGet("assignments")]
|
||||
public async Task<List<string>> GetAssignmentsAsync(
|
||||
[EnumDataType(typeof(AssignTypeEnumType))] AssignTypeEnumType uniqueType,
|
||||
|
||||
Reference in New Issue
Block a user