Ejemplo n.º 1
0
        public ActionResult GetSearch([FromBody] TextForPost searchtext)
        {
            var search = _dataService.searchPosts(searchtext.SearchText);

            if (search == null)
            {
                return(NotFound());
            }

            return(Ok());
        }
Ejemplo n.º 2
0
        public ActionResult GetSearch([FromBody] TextForPost searchtext)
        {
            var search = _dataService.searchPosts(searchtext.SearchText);

            _dataService.CreateSearchHistory(searchtext.SearchText, searchtext.UserName, DateTime.Now);
            if (search == null)
            {
                return(NotFound());
            }

            return(Ok(search));
        }