public IActionResult Index(int channelId, int id)
        {
            if (id == 0)
            {
                return(Redirect("/404.html"));
            }


            var template = ChannelManagerCache.GetContentTemplate(channelId);

            if (template == null)
            {
                return(Redirect("/404.html"));
            }
            var content = _contentApp.GetContentInfo(id);

            if (content == null)
            {
                return(Redirect("/404.html"));
            }
            GenerateContent gen = new GenerateContent();
            var             ret = gen.GenerateContentHtml(content, template);

            if (!ret.genStatus)
            {
                return(Redirect("/404.html"));
            }
            return(Html(ret.contentHtml));
        }
Esempio n. 2
0
        public IActionResult Index(int channelId, int id)
        {
            if (id == 0)
            {
                return(Redirect("/404.html"));
            }



            GenerateContent gen = new GenerateContent();
            var             ret = gen.GenerateContentHtml(channelId, id);

            if (!ret.genStatus)
            {
                return(Redirect("/404.html"));
            }
            return(Html(ret.contentHtml));
        }