refactor: deleteAttachment return data

This commit is contained in:
Net 2024-08-28 13:47:23 +07:00 committed by Methapon Metanipat
parent 79dab0a0e3
commit cd7bbc21a6

View file

@ -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) {