using Application.Abstractions.Messaging;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using GetLoginLog = Application.Features.Admin.Member.Logs.Login.Get;

namespace Admin.Pages.Member.Log.Login;

public class InfoModel(IMediator mediator) : PageModel
{
    public GetLoginLog.Response? Data { get; set; }

    public async Task<IActionResult> OnGetAsync(int id, CancellationToken ct)
    {
        Data = await mediator.Send(new GetLoginLog.Query(id), ct);

        return Page();
    }
}
