refactor: deleteAttachment return data
This commit is contained in:
parent
79dab0a0e3
commit
cd7bbc21a6
1 changed files with 6 additions and 1 deletions
|
|
@ -230,7 +230,12 @@ const useCustomerStore = defineStore('api-customer', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deleteAttachment(id: string, filename: string) {
|
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) {
|
async function listAttachment(id: string) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue