shopping-assistant-api/ShoppingAssistantApi.Api/Queries/RolesQuery.cs
2023-09-22 23:02:20 +03:00

16 lines
562 B
C#

using ShoppingAssistantApi.Application.IServices;
using ShoppingAssistantApi.Application.Models.Dtos;
using ShoppingAssistantApi.Application.Paging;
using HotChocolate.Authorization;
namespace ShoppingAssistantApi.Api.Queries;
[ExtendObjectType(OperationTypeNames.Query)]
public class RolesQuery
{
[Authorize]
public Task<PagedList<RoleDto>> GetRolesPageAsync(int pageNumber, int pageSize, CancellationToken cancellationToken,
[Service] IRolesService service)
=> service.GetRolesPageAsync(pageNumber, pageSize, cancellationToken);
}