async function deletePlace(place: Place) {
try {
await fetch(`${APP_URL}/api/locais/${place.id}`, {
method: "DELETE",
headers: {
"Content-Type": "application/json",
},
});
console.log(`Deleted place with ID ${place.id}`);
} catch (error) {
console.error(error);
}
}
async function deletePlace(place: Place) {
try {
await fetch(`${APP_URL}/api/locais/${place.id}`, {
method: "DELETE",
headers: {
"Content-Type": "application/json",
},
});
console.log(`Deleted place with ID ${place.id}`);
} catch (error) {
console.error(error);
}
}