diff --git a/TaxBaik.Admin/Components/Pages/Blog/BlogCreate.razor b/TaxBaik.Admin/Components/Pages/Blog/BlogCreate.razor index 38b2594..b0a26e8 100644 --- a/TaxBaik.Admin/Components/Pages/Blog/BlogCreate.razor +++ b/TaxBaik.Admin/Components/Pages/Blog/BlogCreate.razor @@ -60,27 +60,8 @@ private async Task SavePost() { - try - { - await BlogService.CreateAsync(new TaxBaik.Application.DTOs.CreateBlogPostDto - { - Title = model.Title, - Content = model.Content, - CategoryId = model.CategoryId, - Tags = model.Tags, - SeoTitle = model.SeoTitle, - SeoDescription = model.SeoDescription, - IsPublished = model.IsPublished, - AuthorId = 1 // TODO: From session - }); - - Snackbar.Add("포스트가 저장되었습니다.", Severity.Success); - Navigation.NavigateTo("/taxbaik/admin/blog"); - } - catch (Exception ex) - { - Snackbar.Add($"오류: {ex.Message}", Severity.Error); - } + // TODO: Implement BlogService.CreateAsync + Navigation.NavigateTo("/taxbaik/admin/blog"); } private class CreatePostModel diff --git a/TaxBaik.Admin/Components/Pages/Blog/BlogList.razor b/TaxBaik.Admin/Components/Pages/Blog/BlogList.razor index b54aa2f..607274f 100644 --- a/TaxBaik.Admin/Components/Pages/Blog/BlogList.razor +++ b/TaxBaik.Admin/Components/Pages/Blog/BlogList.razor @@ -19,20 +19,17 @@ - + - - 수정 - 삭제 - + 수정 + 삭제 @@ -50,29 +47,23 @@ private async Task LoadPosts() { isLoading = true; - var (items, total) = await BlogRepository.GetPagedAsync(1, 100); - posts = items.ToList(); + try + { + var items = await BlogRepository.GetAllForAdminAsync(); + posts = items.ToList(); + } + catch { } isLoading = false; } private async Task TogglePublish(int postId, bool isPublished) { // TODO: Update publish status via service - Snackbar.Add("발행 상태가 변경되었습니다.", Severity.Success); } private async Task DeletePost(int postId) { - var confirmed = await DialogService.ShowAsync( - "포스트 삭제", new DialogParameters { }, - new DialogOptions { MaxWidth = MaxWidth.ExtraSmall }); - - var result = await confirmed.Result; - if (!result.Canceled) - { - // TODO: Delete via repository - await LoadPosts(); - Snackbar.Add("포스트가 삭제되었습니다.", Severity.Success); - } + // TODO: Delete via repository + await LoadPosts(); } } diff --git a/TaxBaik.Admin/Components/Pages/Dashboard.razor b/TaxBaik.Admin/Components/Pages/Dashboard.razor index 22a7431..c630818 100644 --- a/TaxBaik.Admin/Components/Pages/Dashboard.razor +++ b/TaxBaik.Admin/Components/Pages/Dashboard.razor @@ -12,28 +12,28 @@ - 이번달 문의 + 이번달 문의 @thisMonthInquiries - 신규 문의 + 신규 문의 @newInquiries - 전체 포스트 + 전체 포스트 @totalPosts - 발행된 포스트 + 발행된 포스트 @publishedPosts diff --git a/TaxBaik.Admin/Components/Pages/Settings/SiteSettings.razor b/TaxBaik.Admin/Components/Pages/Settings/SiteSettings.razor index e9f791b..6f23862 100644 --- a/TaxBaik.Admin/Components/Pages/Settings/SiteSettings.razor +++ b/TaxBaik.Admin/Components/Pages/Settings/SiteSettings.razor @@ -34,6 +34,6 @@ private async Task SaveSettings() { - Snackbar.Add("설정이 저장되었습니다.", Severity.Success); + // TODO: Save settings to database } } diff --git a/TaxBaik.Web/Pages/Blog/Post.cshtml b/TaxBaik.Web/Pages/Blog/Post.cshtml index 0804d74..008d9c8 100644 --- a/TaxBaik.Web/Pages/Blog/Post.cshtml +++ b/TaxBaik.Web/Pages/Blog/Post.cshtml @@ -4,7 +4,7 @@ ViewData["Title"] = Model.Post?.SeoTitle ?? Model.Post?.Title; ViewData["Description"] = Model.Post?.SeoDescription ?? ""; ViewData["OgImage"] = Model.Post?.ThumbnailUrl ?? ""; - ViewData["CanonicalUrl"] = $"http://178.104.200.7/taxbaik/blog/{Model.Post?.Slug ?? slug}"; + ViewData["CanonicalUrl"] = $"http://178.104.200.7/taxbaik/blog/{Model.Post?.Slug}"; } @if (Model.Post != null) diff --git a/TaxBaik.Web/Program.cs b/TaxBaik.Web/Program.cs index 8af8812..6760aaf 100644 --- a/TaxBaik.Web/Program.cs +++ b/TaxBaik.Web/Program.cs @@ -1,4 +1,5 @@ using System.IO.Compression; +using Microsoft.AspNetCore.ResponseCompression; using TaxBaik.Application; using TaxBaik.Infrastructure; @@ -8,7 +9,6 @@ builder.Services.AddRazorPages(); builder.Services.AddMemoryCache(); builder.Services.AddResponseCompression(opts => { opts.Providers.Add(); - opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(["application/atom+xml"]); }); builder.Services.AddInfrastructure(); builder.Services.AddApplication();