2024-02-14 15:13:56 +01:00
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Umbraco.Cms.Api.Management.Controllers.Content;
|
|
|
|
|
using Umbraco.Cms.Api.Management.Routing;
|
|
|
|
|
using Umbraco.Cms.Api.Management.ViewModels.Media;
|
|
|
|
|
using Umbraco.Cms.Api.Management.ViewModels.Media.Collection;
|
|
|
|
|
using Umbraco.Cms.Core;
|
|
|
|
|
using Umbraco.Cms.Core.Mapping;
|
|
|
|
|
using Umbraco.Cms.Core.Models;
|
|
|
|
|
using Umbraco.Cms.Core.Services.OperationStatus;
|
|
|
|
|
using Umbraco.Cms.Web.Common.Authorization;
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Cms.Api.Management.Controllers.Media.Collection;
|
|
|
|
|
|
|
|
|
|
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Collection}/{Constants.UdiEntityType.Media}")]
|
|
|
|
|
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Media))]
|
2024-03-04 14:51:24 +00:00
|
|
|
[Authorize(Policy = AuthorizationPolicies.SectionAccessMedia)]
|
2024-09-16 10:30:19 +02:00
|
|
|
public abstract class MediaCollectionControllerBase : ContentCollectionControllerBase<IMedia, MediaCollectionResponseModel, MediaValueResponseModel, MediaVariantResponseModel>
|
2024-02-14 15:13:56 +01:00
|
|
|
{
|
|
|
|
|
protected MediaCollectionControllerBase(IUmbracoMapper mapper)
|
|
|
|
|
: base(mapper)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected IActionResult CollectionOperationStatusResult(ContentCollectionOperationStatus status)
|
|
|
|
|
=> ContentCollectionOperationStatusResult(status, "media");
|
|
|
|
|
}
|