Ejemplo n.º 1
0
        public JsonResult GetNews(NewsFilterVM filter, int page = 1, int quantity = 10)
        {
            try
            {
                var news = _newsManager.GetFilteredNews(filter, page, quantity);

                return(new JsonResult(new { success = true, data = news }));
            }
            catch (Exception ex)
            {
                return(new JsonResult(new { success = false, msg = ex.Message }));
            }
        }