[FIX] MktgLeadController + ContactController: getRequestBody → getJsonBody

Il metodo corretto in BaseController è getJsonBody(), non getRequestBody().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
DevEnv nis2-agile 2026-03-09 12:19:21 +01:00
parent b909136d53
commit 86cd5f760b
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ class ContactController extends BaseController
file_put_contents($cacheFile, json_encode($data));
// Validazione input
$body = $this->getRequestBody();
$body = $this->getJsonBody();
$nome = trim($body['nome'] ?? '');
$email = trim($body['email'] ?? '');
$azienda = trim($body['azienda'] ?? '');

View File

@ -46,7 +46,7 @@ class MktgLeadController extends BaseController
file_put_contents($cacheFile, json_encode($cache));
// Input
$body = $this->getRequestBody();
$body = $this->getJsonBody();
// Supporta sia campi IT (form NIS2) che campi EN (standard mktg)
$name = trim($body['name'] ?? $body['nome'] ?? '');