using MediatR;
using Modules.Library.Application.Gateways;

namespace Modules.Library.Application.Queries.Dictionaries.Language;

public class LanguageListQuery : IRequest<List<Models.Language>>
{
    
}

public class LanguageListQueryHandler(ILanguageGateway languageGateway) : IRequestHandler<LanguageListQuery, List<Models.Language>>
{
    public async Task<List<Models.Language>> Handle(LanguageListQuery request, CancellationToken cancellationToken)
    {
        return await languageGateway.GetList();
    }
}