예제 #1
0
        public ActionResult <FeedModel> GetFeed([FromQuery] SearchRequest searchRequest)
        {
            var posts     = _posts.SearchFeed(searchRequest);
            var postCount = _posts.Count(searchRequest);

            return(FeedModel.Create(searchRequest, posts, postCount));
        }
예제 #2
0
        public ActionResult <FeedModel> GetFeed([FromQuery] SearchRequest searchRequest)
        {
            // if (!_authService.HasValidAuthorization(Request))
            // {
            //     return UnauthorizedResult();
            // }
            var posts     = _posts.SearchFeed(searchRequest);
            var postCount = _posts.Count(searchRequest);

            return(FeedModel.Create(searchRequest, posts, postCount));
        }
예제 #3
0
        public ActionResult <FeedModel> GetFeed([FromQuery] FeedSearchRequest searchRequest)
        {
            /*if (!_basicAuthenticateHelper.HandleAuthenticate(Request))
             * {
             *  return Unauthorized();
             * }*/

            var posts     = _posts.SearchFeed(searchRequest);
            var postCount = _posts.Count(searchRequest);

            return(FeedModel.Create(searchRequest, posts, postCount));
        }