Files
mixtape/zero.Backoffice/Endpoints/Pages/PagesController.cs
T

22 lines
566 B
C#
Raw Normal View History

2021-12-20 13:03:56 +01:00
using Microsoft.AspNetCore.Mvc;
using zero.Api.Models;
namespace zero.Backoffice.Endpoints.Pages;
public class PagesController : ZeroBackofficeController
{
readonly IPageTreeService PageTreeService;
public PagesController(IPageTreeService pageTreeService)
{
PageTreeService = pageTreeService;
}
[HttpGet("{parentId}/children")]
public async Task<ActionResult<List<TreeItem>>> GetChildren(string parentId = null, string activeId = null, string search = null)
{
return await PageTreeService.GetChildren(parentId, activeId, search);
}
}