using LiteCqrs;
using TeleWave.Application.Common.Interfaces;

namespace TeleWave.Application.Admin.Roles.ListRoles;

public sealed class ListRolesQueryHandler(IRoleService roleService)
    : IQueryHandler<ListRolesQuery, IReadOnlyList<RoleDto>>
{
    public Task<IReadOnlyList<RoleDto>> Handle(
        ListRolesQuery query,
        CancellationToken cancellationToken
    ) => roleService.ListRolesAsync(cancellationToken);
}
