Standardize admin pages and blog editor
TaxBaik CI/CD / build-and-deploy (push) Failing after 2m39s

This commit is contained in:
2026-07-09 11:33:17 +09:00
parent 9cf6675dc9
commit 55933649f6
27 changed files with 825 additions and 68 deletions
@@ -1,7 +1,30 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using TaxBaik.Application.DTOs;
using TaxBaik.Application.Services;
using TaxBaik.Web.Services;
namespace TaxBaik.Web.Pages.Admin.Blog;
[Authorize(AuthenticationSchemes = AdminAuthDefaults.Scheme)]
public class CreateModel : PageModel { }
namespace TaxBaik.Web.Pages.Admin.Blog;
[Authorize(AuthenticationSchemes = AdminAuthDefaults.Scheme)]
public class CreateModel(BlogService blogService) : PageModel
{
[BindProperty]
public CreateBlogPostDto Input { get; set; } = new()
{
Content = string.Empty,
Title = string.Empty
};
public IActionResult OnGet() => Page();
public async Task<IActionResult> OnPostAsync(CancellationToken ct)
{
if (!ModelState.IsValid)
return Page();
await blogService.CreateAsync(Input, ct);
return RedirectToPage("/Admin/Blog/Index");
}
}