using Application.Aggregates.Users;
using Application.Aggregates.Users.ViewModels;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace Server.Pages.Panel.Users;

public class IndexModel
    (UsersApplication usersApplication) : PageModel
{
    public List<UserViewModel> Users { get; set; } = [];

    public async Task OnGetAsync()
    {
        Users = await usersApplication.GetUsers();
    }
}
