<?php
declare(strict_types=1);
namespace App\Controllers;

use App\Core\Controller;
use App\Repositories\AuditRepository;

final class AuditController extends Controller {
    public function index(): void {
        require_role(['admin']);
        $module = trim((string)($_GET['module'] ?? ''));
        $rows = (new AuditRepository())->recent($module);
        $this->view('audit/index', compact('rows', 'module'));
    }
}
