Rimosso ID Pizza da form di aggiunta
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user