2024-03-25 12:15:50 +01:00
|
|
|
|
using Asp.Versioning;
|
|
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
using Umbraco.Cms.Api.Management.ViewModels.Tree;
|
|
|
|
|
|
using Umbraco.Cms.Core.IO;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Cms.Api.Management.Controllers.Script.Tree;
|
|
|
|
|
|
|
|
|
|
|
|
[ApiVersion("1.0")]
|
|
|
|
|
|
public class AncestorsScriptTreeController : ScriptTreeControllerBase
|
|
|
|
|
|
{
|
|
|
|
|
|
public AncestorsScriptTreeController(FileSystems fileSystems)
|
|
|
|
|
|
: base(fileSystems)
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[HttpGet("ancestors")]
|
|
|
|
|
|
[MapToApiVersion("1.0")]
|
|
|
|
|
|
[ProducesResponseType(typeof(IEnumerable<FileSystemTreeItemPresentationModel>), StatusCodes.Status200OK)]
|
2024-04-09 08:18:45 +02:00
|
|
|
|
public async Task<ActionResult<IEnumerable<FileSystemTreeItemPresentationModel>>> Ancestors(
|
|
|
|
|
|
CancellationToken cancellationToken,
|
|
|
|
|
|
string descendantPath)
|
2024-03-25 12:15:50 +01:00
|
|
|
|
=> await GetAncestors(descendantPath);
|
|
|
|
|
|
}
|