add page creation handler?...

This commit is contained in:
2020-11-06 14:16:11 +01:00
parent 7edd9549e6
commit ffa66f7c0c
5 changed files with 74 additions and 14 deletions
+2 -8
View File
@@ -50,15 +50,9 @@ namespace zero.Web.Controllers
}
public EditModel<IPage> GetEmpty([FromQuery] string type, [FromQuery] string parent = null)
public async Task<EditModel<IPage>> GetEmpty([FromQuery] string type, [FromQuery] string parent = null)
{
PageType pageType = Api.GetPageType(type);
IPage model = Activator.CreateInstance(pageType.ContentType) as IPage;
model.PageTypeAlias = type;
model.ParentId = parent;
return Edit(model);
return Edit(await Api.GetEmpty(type, parent));
}