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