From 084cbb2b5f53a66f354fba4e6990ee2dbdf17525 Mon Sep 17 00:00:00 2001 From: Andrea Date: Thu, 4 Dec 2025 09:06:48 +0100 Subject: [PATCH] Rimosso ID Pizza da form di aggiunta --- add.html | 6 ++---- script.js | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/add.html b/add.html index 2b4c65b..bd44bf4 100644 --- a/add.html +++ b/add.html @@ -8,12 +8,10 @@
-
-

-
+

-

+

diff --git a/script.js b/script.js index 49fa41f..6957bb2 100644 --- a/script.js +++ b/script.js @@ -84,12 +84,11 @@ function editPizza(id){ } } -function addPizza(id, nome, prezzo){ +function addPizza(nome, prezzo){ const myHeaders = new Headers(); myHeaders.append("Content-Type", "application/json"); const raw = JSON.stringify({ - "id": id, "nome": nome, "prezzo": prezzo }); @@ -117,8 +116,7 @@ function handleAddPizza(event){ event.preventDefault(); const nome = document.getElementById("name").value; - const id = document.getElementById("id").value; const prezzo = document.getElementById("price").value; - addPizza(id, nome, prezzo); + addPizza(nome, prezzo); } \ No newline at end of file