Files
Umbraco-CMS/src/Umbraco.Web.BackOffice/Profiling/WebProfilingController.cs
Bjarke Berg b2b0291386 Netcore: Migration of more controllers (#8220)
* https://dev.azure.com/umbraco/D-Team%20Tracker/_workitems/edit/6587 - Migrated DictionaryController, TinyMceController and UpdateCheckController

* Removing connection string and changing to use the right variable

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2020-06-03 17:17:30 +02:00

30 lines
781 B
C#

using Umbraco.Core;
using Umbraco.Core.Hosting;
using Umbraco.Web.BackOffice.Filters;
using Umbraco.Web.BackOffice.Controllers;
namespace Umbraco.Web.BackOffice.Profiling
{
/// <summary>
/// The API controller used to display the state of the web profiler
/// </summary>
[UmbracoApplicationAuthorizeAttribute(Constants.Applications.Settings)]
public class WebProfilingController : UmbracoAuthorizedJsonController
{
private readonly IHostingEnvironment _hosting;
public WebProfilingController(IHostingEnvironment hosting)
{
_hosting = hosting;
}
public object GetStatus()
{
return new
{
Enabled = _hosting.IsDebugMode
};
}
}}