Fix list not reloading after deleting entry
This commit is contained in:
@@ -56,11 +56,12 @@ function deletePizza(id){
|
||||
|
||||
fetch(apiUrl + "/api/pizze/" + id, requestOptions)
|
||||
.then((response) => response.text())
|
||||
.then((result) => alert("Pizza eliminata con successo!"))
|
||||
.then((result) => {
|
||||
alert("Pizza eliminata con successo!");
|
||||
listPizze();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error)
|
||||
alert("Errore nell'eliminazione della pizza, controllare la console per dettagli sull'errore.");
|
||||
});
|
||||
|
||||
listPizze();
|
||||
}
|
||||
Reference in New Issue
Block a user