示例#1
0
        public async Task <IActionResult> Page(Guid id, bool draft = false)
        {
            try
            {
                var model = await _loader.GetPageAsync <StandardPage>(id, HttpContext.User, draft);

                model.EntryPoints = new System.Collections.Generic.List <Models.Common.EntryPoint>();
                model.ItemInfo    = await _adapterEngine.WaltersParse("http://Example.com/FakeURL");

                return(View(model));
            }
            catch (UnauthorizedAccessException)
            {
                return(Unauthorized());
            }
        }
示例#2
0
        public async Task <IActionResult> GetPowerUsage(string url)
        {
            var modelInfo = await _adapterEngine.WaltersParse(url);

            return(Ok(modelInfo));
        }