26 lines
615 B
JavaScript
Raw Normal View History

async function delItemlist(uuid) {
const apiUrl = `${currentUrl}app/delete-list`;
const postData = {
list_uuid: uuid
};
const requestOptions = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(postData)
};
const response = await fetch(apiUrl, requestOptions)
.catch(error => {
console.error('Error during POST request:', error);
});
if (response.ok) {
console.log(response);
} else {
throw new Error('Error in server response');
}
}