diff --git a/Netina.Api/Controllers/PageController.cs b/Netina.Api/Controllers/PageController.cs index 0fb4d6e..f74f95f 100644 --- a/Netina.Api/Controllers/PageController.cs +++ b/Netina.Api/Controllers/PageController.cs @@ -38,7 +38,7 @@ public class PageController : ICarterModule .HasApiVersion(1.0) .RequireAuthorization(builder => builder.AddAuthenticationSchemes("Bearer").RequireAuthenticatedUser().RequireClaim(CustomClaimType.Permission, ApplicationPermission.ManagePages)); - group.MapPost("", UpdatePageAsync) + group.MapPut("", UpdatePageAsync) .WithDisplayName("Update Page") .HasApiVersion(1.0) .RequireAuthorization(builder => builder.AddAuthenticationSchemes("Bearer").RequireAuthenticatedUser().RequireClaim(CustomClaimType.Permission, ApplicationPermission.ManagePages)); diff --git a/Netina.Core/BaseServices/PageService.cs b/Netina.Core/BaseServices/PageService.cs index c157633..ba5e7d0 100644 --- a/Netina.Core/BaseServices/PageService.cs +++ b/Netina.Core/BaseServices/PageService.cs @@ -26,7 +26,6 @@ public class PageService( if (page == null) throw new AppException("Page not found", ApiResultStatusCode.NotFound); - var entityType = Assembly.GetAssembly(typeof(DomainConfig))?.GetType(page.Type); var dto = page.Adapt(); return dto; diff --git a/Netina.Domain/Dtos/LargDtos/BasePageLDto.cs b/Netina.Domain/Dtos/LargDtos/BasePageLDto.cs index 32073f4..9a3c27d 100644 --- a/Netina.Domain/Dtos/LargDtos/BasePageLDto.cs +++ b/Netina.Domain/Dtos/LargDtos/BasePageLDto.cs @@ -10,6 +10,7 @@ public class BasePageLDto : BaseDto public bool IsHtmlBasePage { get; set; } public string Slug { get; set; } = string.Empty; public string Data { get; set; } = string.Empty; + public string Type { get; set; } = string.Empty; public DateTime ModifiedAt { get; set; } public bool Indexing { get; set; } public List Sections { get; set; } = new();