public async Task <IActionResult> SearchMyFeeds([FromBody] SearchMyFeedsQuery parameter, CancellationToken cancellationToken) { var userId = User.FindFirst(ClaimTypes.NameIdentifier).Value; parameter.UserId = userId; var result = await _mediator.Send(parameter, cancellationToken); return(new OkObjectResult(result)); }
public Task <SearchQueryResult <DetailedFeedQueryResult> > Handle(SearchMyFeedsQuery request, CancellationToken cancellationToken) { return(_feedQueryRepository.SearchFeeds(new SearchFeedParameter { DatasourceIds = request.DatasourceIds, FollowersFilter = Parse <FollowerFilterTypes>(request.FollowersFilter), IsPaginationEnabled = request.IsPaginationEnabled, StoriesFilter = Parse <NumberStoriesFilterTypes>(request.StoriesFitler), Count = request.Count, Direction = request.Direction, FeedTitle = request.FeedTitle, Order = request.Order, StartIndex = request.StartIndex, UserId = request.UserId }, cancellationToken)); }