diff --git a/Lombiq.JsonEditor/Controllers/AdminController.cs b/Lombiq.JsonEditor/Controllers/AdminController.cs index 22ee617..509ed55 100644 --- a/Lombiq.JsonEditor/Controllers/AdminController.cs +++ b/Lombiq.JsonEditor/Controllers/AdminController.cs @@ -1,13 +1,13 @@ using AngleSharp.Common; using Lombiq.HelpfulLibraries.OrchardCore.Contents; using Lombiq.HelpfulLibraries.OrchardCore.DependencyInjection; -using Lombiq.HelpfulLibraries.OrchardCore.Mvc; using Lombiq.JsonEditor.ViewModels; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Localization; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.Extensions.Localization; +using OrchardCore.Admin; using OrchardCore.ContentManagement; using OrchardCore.ContentManagement.Metadata; using OrchardCore.Contents; @@ -58,7 +58,7 @@ public AdminController( H = services.HtmlLocalizer.Value; } - [AdminRoute("Contents/ContentItems/{contentItemId}/Edit/Json")] + [Admin("Contents/ContentItems/{contentItemId}/Edit/Json")] public async Task Edit(string contentItemId) { if (string.IsNullOrWhiteSpace(contentItemId) || diff --git a/Lombiq.JsonEditor/Startup.cs b/Lombiq.JsonEditor/Startup.cs index 41ced1d..47c104f 100644 --- a/Lombiq.JsonEditor/Startup.cs +++ b/Lombiq.JsonEditor/Startup.cs @@ -1,5 +1,4 @@ using Lombiq.HelpfulLibraries.OrchardCore.DependencyInjection; -using Lombiq.HelpfulLibraries.OrchardCore.Mvc; using Lombiq.JsonEditor.Constants; using Lombiq.JsonEditor.Drivers; using Lombiq.JsonEditor.Fields; @@ -43,6 +42,5 @@ public override void ConfigureServices(IServiceCollection services) services.AddOrchardServices(); services.AddScoped(); services.AddContentSecurityPolicyProvider(); - AdminRouteAttributeRouteMapper.AddToServices(services); } }