Class ModelsBuilderDashboardController
- Namespace
- Umbraco.Cms.Web.BackOffice.ModelsBuilder
- Assembly
- Umbraco.Web.BackOffice.dll
API controller for use in the Umbraco back office with Angular resources
[Authorize(Policy = "SectionAccessSettings")]
public class ModelsBuilderDashboardController : UmbracoAuthorizedJsonController
- Inheritance
-
ModelsBuilderDashboardController
- Inherited Members
Remarks
We've created a different controller for the backoffice/angular specifically this is to ensure that the correct CSRF security is adhered to for angular and it also ensures that this controller is not subseptipal to global WebApi formatters being changed since this is always forced to only return Angular JSON Specific formats.
Constructors
ModelsBuilderDashboardController(IOptions<ModelsBuilderSettings>, IModelsGenerator, OutOfDateModelsStatus, ModelsGenerationError)
[ActivatorUtilitiesConstructor]
public ModelsBuilderDashboardController(IOptions<ModelsBuilderSettings> config, IModelsGenerator modelsGenerator, OutOfDateModelsStatus outOfDateModels, ModelsGenerationError mbErrors)
Parameters
configIOptions<ModelsBuilderSettings>modelsGeneratorIModelsGeneratoroutOfDateModelsOutOfDateModelsStatusmbErrorsModelsGenerationError
ModelsBuilderDashboardController(IOptions<ModelsBuilderSettings>, ModelsGenerator, IModelsGenerator, OutOfDateModelsStatus, ModelsGenerationError)
[Obsolete("This constructor is obsolete and will be removed in v13. Use the constructor with only IModelsGenerator instead.")]
[Browsable(false)]
public ModelsBuilderDashboardController(IOptions<ModelsBuilderSettings> config, ModelsGenerator concreteModelGenerator, IModelsGenerator modelsGenerator, OutOfDateModelsStatus outOfDateModels, ModelsGenerationError mbErrors)
Parameters
configIOptions<ModelsBuilderSettings>concreteModelGeneratorModelsGeneratormodelsGeneratorIModelsGeneratoroutOfDateModelsOutOfDateModelsStatusmbErrorsModelsGenerationError
ModelsBuilderDashboardController(IOptions<ModelsBuilderSettings>, ModelsGenerator, OutOfDateModelsStatus, ModelsGenerationError)
[Obsolete("This constructor is obsolete and will be removed in v13. Use the constructor with IModelsGenerator instead.")]
[Browsable(false)]
public ModelsBuilderDashboardController(IOptions<ModelsBuilderSettings> config, ModelsGenerator modelsGenerator, OutOfDateModelsStatus outOfDateModels, ModelsGenerationError mbErrors)
Parameters
configIOptions<ModelsBuilderSettings>modelsGeneratorModelsGeneratoroutOfDateModelsOutOfDateModelsStatusmbErrorsModelsGenerationError
Methods
BuildModels()
[HttpPost]
public IActionResult BuildModels()
Returns
GetDashboard()
[HttpGet]
public ActionResult<ModelsBuilderDashboardController.Dashboard> GetDashboard()
Returns
GetModelsOutOfDateStatus()
[HttpGet]
public ActionResult<ModelsBuilderDashboardController.OutOfDateStatus> GetModelsOutOfDateStatus()