fix: แก้ส่งค่างว่างของ image
This commit is contained in:
parent
fd8087a5c5
commit
e83282aafa
1 changed files with 8 additions and 7 deletions
|
|
@ -145,12 +145,13 @@ const useCustomerStore = defineStore('api-customer', () => {
|
|||
if (fileList)
|
||||
return await addBranchAttachment(v.id, { file: fileList });
|
||||
}),
|
||||
await axios
|
||||
.put(res.data.imageUploadUrl, image, {
|
||||
headers: { 'Content-Type': image.type },
|
||||
onUploadProgress: (e) => console.log(e),
|
||||
})
|
||||
.catch((e) => console.error(e)),
|
||||
image &&
|
||||
(await axios
|
||||
.put(res.data.imageUploadUrl, image, {
|
||||
headers: { 'Content-Type': image?.type },
|
||||
onUploadProgress: (e) => console.log(e),
|
||||
})
|
||||
.catch((e) => console.error(e))),
|
||||
]);
|
||||
|
||||
if (!res) return false;
|
||||
|
|
@ -271,7 +272,7 @@ const useCustomerStore = defineStore('api-customer', () => {
|
|||
Customer & {
|
||||
branch: CustomerBranch[];
|
||||
}
|
||||
>(`'/customer-branch'/${id}`, data, {
|
||||
>(`/customer-branch/${id}`, data, {
|
||||
headers: {
|
||||
'X-Session-Id': flow?.sessionId,
|
||||
'X-Rtid': flow?.refTransactionId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue