Browse Source
Move ConfiguredEndpoints to module itself
pull/17642/head
Enis Necipoglu
3 years ago
No known key found for this signature in database
GPG Key ID: 1EC55E13241E1680
2 changed files with
10 additions and
4 deletions
-
modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs
-
modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs
|
|
|
@ -273,10 +273,7 @@ public class CmsKitWebUnifiedModule : AbpModule |
|
|
|
app.UseAuditing(); |
|
|
|
app.UseAbpSerilogEnrichers(); |
|
|
|
|
|
|
|
app.UseConfiguredEndpoints(builder => |
|
|
|
{ |
|
|
|
builder.MapCmsPageRoute(); |
|
|
|
}); |
|
|
|
app.UseConfiguredEndpoints(); |
|
|
|
|
|
|
|
using (var scope = context.ServiceProvider.CreateScope()) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using Microsoft.AspNetCore.Mvc.RazorPages; |
|
|
|
using Microsoft.AspNetCore.Routing; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Volo.Abp.AspNetCore.Mvc.Localization; |
|
|
|
using Volo.Abp.AutoMapper; |
|
|
|
@ -40,6 +41,14 @@ public class CmsKitPublicWebModule : AbpModule |
|
|
|
{ |
|
|
|
mvcBuilder.AddApplicationPartIfNotExists(typeof(CmsKitPublicWebModule).Assembly); |
|
|
|
}); |
|
|
|
|
|
|
|
PreConfigure<AbpEndpointRouterOptions>(options => |
|
|
|
{ |
|
|
|
options.EndpointConfigureActions.Add(context => |
|
|
|
{ |
|
|
|
context.Endpoints.MapCmsPageRoute(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
|