Routes in nav items, redirects, breadcrumbs, and JS data URLs all pointed to the old admin/ prefix from before the module was restructured. Also corrects use-statements still referencing core Domain\Taxonomy namespace instead of Module\Audit\Domain. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
19 lines
565 B
PHP
19 lines
565 B
PHP
<?php
|
|
|
|
use MintyPHP\Buffer;
|
|
use MintyPHP\Router;
|
|
use MintyPHP\Support\Flash;
|
|
use MintyPHP\Support\Guard;
|
|
|
|
Guard::requireLogin();
|
|
Guard::requireAbility(\MintyPHP\Module\Audit\AuditAuthorizationPolicy::ABILITY_API_AUDIT_VIEW);
|
|
|
|
$auditId = (int) ($id ?? 0);
|
|
$auditLog = $auditId > 0 ? app(\MintyPHP\Module\Audit\Service\ApiAuditService::class)->find($auditId) : null;
|
|
if (!$auditLog) {
|
|
Flash::error('API audit entry not found', 'audit/api-audit', 'api_audit_not_found');
|
|
Router::redirect('audit/api-audit');
|
|
}
|
|
|
|
Buffer::set('title', t('View API audit entry'));
|