using MemberCenter.Application.Abstractions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace MemberCenter.Web.Controllers.Admin;

[Authorize(Policy = "Admin")]
[Route("admin/audit-logs")]
public class AuditLogsController : Controller
{
    private readonly IAuditLogService _auditLogService;

    public AuditLogsController(IAuditLogService auditLogService)
    {
        _auditLogService = auditLogService;
    }

    [HttpGet("")]
    public async Task<IActionResult> Index()
    {
        var logs = await _auditLogService.ListAsync();
        return View(logs);
    }
}
