コード例 #1
0
        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));
        }
コード例 #2
0
 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));
 }