diff --git a/application/controllers/ContactController.php b/application/controllers/ContactController.php index df7cbc0..1771d52 100644 --- a/application/controllers/ContactController.php +++ b/application/controllers/ContactController.php @@ -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'] ?? ''); diff --git a/application/controllers/MktgLeadController.php b/application/controllers/MktgLeadController.php index 42eb950..0fe2265 100644 --- a/application/controllers/MktgLeadController.php +++ b/application/controllers/MktgLeadController.php @@ -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'] ?? '');