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
+13 -11
View File
@@ -1,12 +1,12 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using TaxBaik.Web.Services;
using TaxBaik.Application.Services;
namespace TaxBaik.Web.Pages;
public class ContactModel : PageModel
{
private readonly IApiClient _apiClient;
private readonly InquiryService _inquiryService;
[BindProperty]
public string Name { get; set; } = "";
@@ -26,9 +26,9 @@ public class ContactModel : PageModel
[BindProperty]
public bool Agree { get; set; }
public ContactModel(IApiClient apiClient)
public ContactModel(InquiryService inquiryService)
{
_apiClient = apiClient;
_inquiryService = inquiryService;
}
public async Task<IActionResult> OnPostAsync()
@@ -38,19 +38,21 @@ public class ContactModel : PageModel
try
{
var inquiry = new
{
await _inquiryService.SubmitAsync(
Name,
Phone,
Email,
ServiceType,
Message
};
await _apiClient.PostAsync<object>("inquiry", inquiry);
Message,
Email,
HttpContext.Connection.RemoteIpAddress?.ToString());
TempData["Success"] = "상담 신청이 접수되었습니다. 빠른 시간 내에 연락드리겠습니다.";
return RedirectToPage();
}
catch (ValidationException ex)
{
ModelState.AddModelError("", ex.Message);
return Page();
}
catch
{
ModelState.AddModelError("", "시스템 오류가 발생했습니다. 잠시 후 다시 시도해주세요.");