using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using WorkFlowCheck.Web.Services.Interfaces;

namespace WorkFlowCheck.Web.Pages.UserAndRole
{
    public class RoleCheckListTemplateHeadersPageModel : PageModel
    {
        private readonly ILogger<IndexModel> _logger;
        private readonly IUserService _userService;
        public RoleCheckListTemplateHeadersPageModel(ILogger<IndexModel> logger, IUserService userService)
        {
            _logger = logger;
            _userService = userService;
        }
        public async Task OnGet()
        {
        }
        public async Task<JsonResult> OnGetLoadRoleCheckListTemplateHeaders()
        {
            var results = await _userService.GetAllRoleCheckListTemplates();
            return new JsonResult(new { data = results });
        }
    }
}
