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)
|
if (fileList)
|
||||||
return await addBranchAttachment(v.id, { file: fileList });
|
return await addBranchAttachment(v.id, { file: fileList });
|
||||||
}),
|
}),
|
||||||
await axios
|
image &&
|
||||||
.put(res.data.imageUploadUrl, image, {
|
(await axios
|
||||||
headers: { 'Content-Type': image.type },
|
.put(res.data.imageUploadUrl, image, {
|
||||||
onUploadProgress: (e) => console.log(e),
|
headers: { 'Content-Type': image?.type },
|
||||||
})
|
onUploadProgress: (e) => console.log(e),
|
||||||
.catch((e) => console.error(e)),
|
})
|
||||||
|
.catch((e) => console.error(e))),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (!res) return false;
|
if (!res) return false;
|
||||||
|
|
@ -271,7 +272,7 @@ const useCustomerStore = defineStore('api-customer', () => {
|
||||||
Customer & {
|
Customer & {
|
||||||
branch: CustomerBranch[];
|
branch: CustomerBranch[];
|
||||||
}
|
}
|
||||||
>(`'/customer-branch'/${id}`, data, {
|
>(`/customer-branch/${id}`, data, {
|
||||||
headers: {
|
headers: {
|
||||||
'X-Session-Id': flow?.sessionId,
|
'X-Session-Id': flow?.sessionId,
|
||||||
'X-Rtid': flow?.refTransactionId,
|
'X-Rtid': flow?.refTransactionId,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue