* Add CancellationToken to controllers * Fix GetManagementApiUrl * Forgotten Item and Tree controllers * Document Blueprint and Version endpoints * Fix merge conflict * Cleanup --------- Co-authored-by: Elitsa <elm@umbraco.dk>
25 lines
818 B
C#
25 lines
818 B
C#
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)]
|
|
public async Task<ActionResult<IEnumerable<FileSystemTreeItemPresentationModel>>> Ancestors(
|
|
CancellationToken cancellationToken,
|
|
string descendantPath)
|
|
=> await GetAncestors(descendantPath);
|
|
}
|