2020-05-11 15:34:47 +02:00
|
|
|
using Microsoft.AspNetCore.Hosting;
|
2020-04-06 15:53:32 +02:00
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2020-04-06 18:45:23 +02:00
|
|
|
using System.Threading.Tasks;
|
2020-04-06 15:53:32 +02:00
|
|
|
using zero.Core.Api;
|
|
|
|
|
|
|
|
|
|
namespace zero.Web.Controllers
|
|
|
|
|
{
|
|
|
|
|
public class PageTreeController : BackofficeController
|
|
|
|
|
{
|
2020-05-11 15:34:47 +02:00
|
|
|
IPageTreeApi Api;
|
2020-04-06 15:53:32 +02:00
|
|
|
|
2020-05-19 15:53:01 +02:00
|
|
|
public PageTreeController(IPageTreeApi api)
|
2020-04-06 15:53:32 +02:00
|
|
|
{
|
|
|
|
|
Api = api;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2020-05-20 11:19:43 +02:00
|
|
|
public async Task<IActionResult> GetChildren(string parent = null, string active = null)
|
2020-04-06 15:53:32 +02:00
|
|
|
{
|
2020-05-22 15:06:17 +02:00
|
|
|
return Json(await Api.GetChildren(parent, active));
|
2020-04-06 15:53:32 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|