2025-07-07 14:53:42 +02:00
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2025-08-05 11:14:59 +02:00
|
|
|
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
|
2025-07-07 14:53:42 +02:00
|
|
|
using Umbraco.Cms.Api.Management.Factories;
|
|
|
|
|
using Umbraco.Cms.Api.Management.ViewModels.Tree;
|
|
|
|
|
using Umbraco.Cms.Core.Services;
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Cms.Api.Management.Controllers.DocumentBlueprint.Tree;
|
|
|
|
|
|
|
|
|
|
public class SiblingsDocumentBlueprintTreeController : DocumentBlueprintTreeControllerBase
|
|
|
|
|
{
|
|
|
|
|
public SiblingsDocumentBlueprintTreeController(IEntityService entityService, IDocumentPresentationFactory documentPresentationFactory)
|
|
|
|
|
: base(entityService, documentPresentationFactory)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet("siblings")]
|
2025-08-05 11:14:59 +02:00
|
|
|
[ProducesResponseType(typeof(SubsetViewModel<DocumentBlueprintTreeItemResponseModel>), StatusCodes.Status200OK)]
|
2025-08-07 12:35:04 +02:00
|
|
|
public async Task<ActionResult<SubsetViewModel<DocumentBlueprintTreeItemResponseModel>>> Siblings(
|
2025-07-07 14:53:42 +02:00
|
|
|
CancellationToken cancellationToken,
|
|
|
|
|
Guid target,
|
|
|
|
|
int before,
|
2025-08-07 12:35:04 +02:00
|
|
|
int after,
|
|
|
|
|
bool foldersOnly = false)
|
|
|
|
|
{
|
|
|
|
|
RenderFoldersOnly(foldersOnly);
|
|
|
|
|
return await GetSiblings(target, before, after);
|
|
|
|
|
}
|
2025-07-07 14:53:42 +02:00
|
|
|
}
|