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

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