[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:
parent
b909136d53
commit
86cd5f760b
@ -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'] ?? '');
|
||||
|
||||
@ -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'] ?? '');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user