This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using TaxBaik.Application.Services;
|
||||
using TaxBaik.Domain.Entities;
|
||||
using TaxBaik.Web.Services;
|
||||
namespace TaxBaik.Web.Pages.Admin.Faqs;
|
||||
[Authorize(AuthenticationSchemes = AdminAuthDefaults.Scheme)]
|
||||
public class IndexModel : PageModel { }
|
||||
|
||||
namespace TaxBaik.Web.Pages.Admin.Faqs;
|
||||
|
||||
[Authorize(AuthenticationSchemes = AdminAuthDefaults.Scheme)]
|
||||
public class IndexModel(FaqService faqService) : PageModel
|
||||
{
|
||||
public List<Faq> Items { get; private set; } = [];
|
||||
|
||||
public async Task OnGetAsync(CancellationToken ct = default)
|
||||
=> Items = (await faqService.GetAllAsync(ct)).ToList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user