feat: harden auth ops and deployment baseline

This commit is contained in:
2026-06-27 10:53:53 +09:00
parent a6ca30eec8
commit 28060b71be
41 changed files with 714 additions and 208 deletions
+6 -15
View File
@@ -1,27 +1,26 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
using TaxBaik.Application.Services;
using TaxBaik.Domain.Entities;
using TaxBaik.Web.Services;
namespace TaxBaik.Web.Pages;
public class IndexModel : PageModel
{
private readonly IApiClient _apiClient;
private readonly BlogService _blogService;
public List<BlogPost> RecentPosts { get; set; } = [];
public IndexModel(IApiClient apiClient)
public IndexModel(BlogService blogService)
{
_apiClient = apiClient;
_blogService = blogService;
}
public async Task OnGetAsync()
{
try
{
var response = await _apiClient.GetAsync<BlogApiResponse>("blog?page=1&pageSize=3");
if (response?.Data != null)
RecentPosts = response.Data.ToList();
var (posts, _) = await _blogService.GetPublishedPagedAsync(1, 3);
RecentPosts = posts.ToList();
}
catch
{
@@ -29,11 +28,3 @@ public class IndexModel : PageModel
}
}
}
public class BlogApiResponse
{
public List<BlogPost> Data { get; set; } = [];
public int Total { get; set; }
public int Page { get; set; }
public int PageSize { get; set; }
}