public async Task <List <TopPostAuthorsResponse> > GetTopAuthors() { var query = new GetTopAuthorsQuery(); var result = await _mediator.Send(query); return(result); }
public async Task <List <TopPostAuthorsResponse> > Handle(GetTopAuthorsQuery request, CancellationToken cancellationToken) { var topAuthors = await _postService.GetTopAuthors(); List <TopPostAuthorsResponse> result = _mapper.Map <List <TopPostAuthorsResponse> >(topAuthors); return(result); }