Enis Necipoglu
3 years ago
No known key found for this signature in database
GPG Key ID: 1EC55E13241E1680
3 changed files with
4 additions and
4 deletions
-
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs
-
modules/cms-kit/src/Volo.CmsKit.Public.Web/DefaultHomePageMiddleware.cs
-
modules/cms-kit/src/Volo.CmsKit.Public.Web/PageRoutingMiddleware.cs
|
|
|
@ -32,14 +32,14 @@ public class PagesPublicController : CmsKitPublicControllerBase, IPagePublicAppS |
|
|
|
} |
|
|
|
|
|
|
|
[HttpGet] |
|
|
|
public Task<PageDto> FindDefaultHomePageAsync() |
|
|
|
public virtual Task<PageDto> FindDefaultHomePageAsync() |
|
|
|
{ |
|
|
|
return PageAppService.FindDefaultHomePageAsync(); |
|
|
|
} |
|
|
|
|
|
|
|
[HttpGet] |
|
|
|
[Route("{slug}/exist")] |
|
|
|
public Task<bool> DoesSlugExistAsync([NotNull] string slug) |
|
|
|
public virtual Task<bool> DoesSlugExistAsync([NotNull] string slug) |
|
|
|
{ |
|
|
|
return PageAppService.DoesSlugExistAsync(slug); |
|
|
|
} |
|
|
|
|
|
|
|
@ -11,7 +11,7 @@ namespace Volo.CmsKit.Public.Web; |
|
|
|
|
|
|
|
public class DefaultHomePageMiddleware : IMiddleware, ITransientDependency |
|
|
|
{ |
|
|
|
public async Task InvokeAsync(HttpContext context, RequestDelegate next) |
|
|
|
public virtual async Task InvokeAsync(HttpContext context, RequestDelegate next) |
|
|
|
{ |
|
|
|
if (context.Request.Path.Value == "/") |
|
|
|
{ |
|
|
|
|
|
|
|
@ -11,7 +11,7 @@ namespace Volo.CmsKit.Public.Web; |
|
|
|
|
|
|
|
public class PageRoutingMiddleware : IMiddleware, ITransientDependency |
|
|
|
{ |
|
|
|
public async Task InvokeAsync(HttpContext context, RequestDelegate next) |
|
|
|
public virtual async Task InvokeAsync(HttpContext context, RequestDelegate next) |
|
|
|
{ |
|
|
|
await next(context); |
|
|
|
|
|
|
|
|