Files
jinko.yikatong/Src/Dlhis.User/Identity/Controllers/RolesController.cs
2023-12-28 11:43:48 +08:00

28 lines
705 B
C#

using Dlhis.User.Identity.Request;
using Dlhis.User.Identity.Response;
using Dlhis.User.Identity.Services;
using Kurisu.Core.DataAccess.Dto;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Dlhis.User.Identity.Controllers;
[Authorize(Roles = "admin")]
[Route("api/[controller]")]
[ApiController]
public class RolesController : ControllerBase
{
private readonly IRoleService _roleService;
public RolesController(IRoleService roleService)
{
_roleService = roleService;
}
[HttpGet]
public async Task<Pagination<RoleRespone>> GetPageAsync(RolePageRequest request)
{
return await _roleService.GetPageAsync(request);
}
}