2020-05-12 10:21:40 +10:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2020-06-13 10:42:07 +02:00
|
|
|
|
using Umbraco.Web.Common.Attributes;
|
2020-05-12 10:21:40 +10:00
|
|
|
|
using Umbraco.Web.Common.Filters;
|
2020-04-20 12:20:47 +02:00
|
|
|
|
using Umbraco.Web.Features;
|
|
|
|
|
|
using Umbraco.Web.WebApi.Filters;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web.Common.Controllers
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Provides a base class for Umbraco API controllers.
|
|
|
|
|
|
/// </summary>
|
2020-05-12 10:21:40 +10:00
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// <para>These controllers are NOT auto-routed.</para>
|
|
|
|
|
|
/// <para>The base class is <see cref="ControllerBase"/> which are netcore API controllers without any view support</para>
|
|
|
|
|
|
/// </remarks>
|
2020-05-14 17:04:16 +10:00
|
|
|
|
[FeatureAuthorize] // TODO: This could be part of our conventions
|
|
|
|
|
|
[TypeFilter(typeof(HttpResponseExceptionFilter))] // TODO: This could be part of our conventions
|
2020-05-12 10:21:40 +10:00
|
|
|
|
[UmbracoApiController]
|
|
|
|
|
|
public abstract class UmbracoApiControllerBase : ControllerBase, IUmbracoFeature
|
2020-04-20 12:20:47 +02:00
|
|
|
|
{
|
2020-05-12 10:21:40 +10:00
|
|
|
|
public UmbracoApiControllerBase()
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
2020-04-20 12:20:47 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|