<?php
require_once __DIR__.'/_auth.php';
$admin = afAdminApiUser($pdo);
$limit = max(1, min(200, (int)($_GET['limit'] ?? 80)));
$subject = (int)($_GET['usuario_id'] ?? 0);
$items = afStage24RecentAudit($pdo, $limit, $subject ?: null);
jsonResponse(['ok'=>true,'stage24'=>STAGE24_AUDIT_VERSION,'auditoria'=>$items]);
