Ejemplo n.º 1
0
        public async Task <IActionResult> SegmentPages()
        {
            var response = await _customPageService.ListSegmentAsync();

            if (response.IsSuccess)
            {
                // for security, only allow published pages to be listed to third party API calls
                var published = response.Item.Where(p => p.IsPublished);
                return(Ok(published));
            }
            return(StatusCode(StatusCodes.Status500InternalServerError));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Manage()
        {
            var response = await _customPageService.ListSegmentAsync();

            return(response.IsSuccess ? View("~/Views/Admin/ManageCustomPage.cshtml", response.Item) : ServerError());
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Manage()
        {
            var pageSegments = await _customPageService.ListSegmentAsync();

            return(View("~/Views/Admin/ManageCustomPage.cshtml", pageSegments));
        }