User feedback on order cancelation

This commit is contained in:
ekzyis 2023-12-03 02:47:15 +01:00
parent 3b7b9e5134
commit 59f7269930
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ const mouseleave = () => {
const cancelOrder = async () => {
const url = '/api/order/' + order.value.Id
await fetch(url, { method: 'DELETE' }).catch(console.error)
await fetch(url, { method: 'DELETE' }).then(() => {
order.value.Status = 'CANCELED'
}).catch(console.error)
}
</script>