2020-10-29 19:29:30 +01:00
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using System.Collections.Generic;
|
2020-04-06 18:45:23 +02:00
|
|
|
using System.Threading.Tasks;
|
2020-04-06 15:53:32 +02:00
|
|
|
using zero.Core.Api;
|
2020-05-25 11:27:23 +02:00
|
|
|
using zero.Core.Entities;
|
2020-04-06 15:53:32 +02:00
|
|
|
|
|
|
|
|
namespace zero.Web.Controllers
|
|
|
|
|
{
|
2020-08-27 14:22:13 +02:00
|
|
|
public class PageTreeController : BackofficeController
|
2020-04-06 15:53:32 +02:00
|
|
|
{
|
2020-08-27 14:22:13 +02:00
|
|
|
IPageTreeApi Api;
|
2020-04-06 15:53:32 +02:00
|
|
|
|
2020-08-27 14:22:13 +02:00
|
|
|
public PageTreeController(IPageTreeApi api)
|
2020-04-06 15:53:32 +02:00
|
|
|
{
|
|
|
|
|
Api = api;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2021-02-08 15:45:25 +01:00
|
|
|
public async Task<IList<TreeItem>> GetChildren([FromQuery] string parent = null, [FromQuery] string active = null, [FromQuery] string search = null)
|
2020-04-06 15:53:32 +02:00
|
|
|
{
|
2021-02-08 15:45:25 +01:00
|
|
|
return await Api.GetChildren(parent, active, search);
|
2020-04-06 15:53:32 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|