17 lines
532 B
C#
17 lines
532 B
C#
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(FaqService faqService) : PageModel
|
|
{
|
|
public List<Faq> Items { get; private set; } = [];
|
|
|
|
public async Task OnGetAsync(CancellationToken ct = default)
|
|
=> Items = (await faqService.GetAllAsync(ct)).ToList();
|
|
}
|