Rimosso ID Pizza da form di aggiunta

This commit is contained in:
2025-12-04 09:06:48 +01:00
parent e67df056b6
commit 084cbb2b5f
2 changed files with 4 additions and 8 deletions

View File

@@ -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);
}