diff --git a/src/stores/customer/index.ts b/src/stores/customer/index.ts index 3abdf649..70944cd2 100644 --- a/src/stores/customer/index.ts +++ b/src/stores/customer/index.ts @@ -230,7 +230,12 @@ const useCustomerStore = defineStore('api-customer', () => { } async function deleteAttachment(id: string, filename: string) { - await api.delete(`/customer-branch/${id}/attachment/{${filename}}`); + const res = await api.delete( + `/customer-branch/${id}/attachment/{${filename}}`, + ); + + if (res.status >= 400) return false; + return true; } async function listAttachment(id: string) {