using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; using zero.Core.Api; using zero.Core.Entities; namespace zero.Web.Controllers { public class PagesController : BackofficeController where T : IPage { IPagesApi Api; public PagesController(IPagesApi api) { Api = api; } /// /// Get all page types which are allowed below a selected parent page /// public async Task GetAllowedPageTypes([FromQuery] string parent = null) { return Json(await Api.GetAllowedPageTypes(parent)); } /// /// Get translation by id /// //public IActionResult GetEmpty() => JsonEdit(new T()); /// /// Get page by id /// public async Task GetById([FromQuery] string id) => JsonEdit(await Api.GetById(id)); } }