fix: type
This commit is contained in:
parent
3f298b73a2
commit
3f5387c26c
1 changed files with 11 additions and 17 deletions
|
|
@ -309,13 +309,7 @@ const useCustomerStore = defineStore('api-customer', () => {
|
||||||
) {
|
) {
|
||||||
const { id, statusSave, code, ...playload } = data;
|
const { id, statusSave, code, ...playload } = data;
|
||||||
|
|
||||||
const res = await api.post<
|
const res = await api.post<CustomerBranch>('/customer-branch', playload, {
|
||||||
Customer & {
|
|
||||||
branch: CustomerBranch[];
|
|
||||||
imageUrl: string;
|
|
||||||
imageUploadUrl: string;
|
|
||||||
}
|
|
||||||
>('/customer-branch', playload, {
|
|
||||||
headers: {
|
headers: {
|
||||||
'X-Session-Id': flow?.sessionId,
|
'X-Session-Id': flow?.sessionId,
|
||||||
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
|
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
|
||||||
|
|
@ -338,17 +332,17 @@ const useCustomerStore = defineStore('api-customer', () => {
|
||||||
) {
|
) {
|
||||||
const { code, branchNo, ...playload } = data;
|
const { code, branchNo, ...playload } = data;
|
||||||
|
|
||||||
const res = await api.put<
|
const res = await api.put<CustomerBranch>(
|
||||||
Customer & {
|
`/customer-branch/${id}`,
|
||||||
branch: CustomerBranch[];
|
playload,
|
||||||
}
|
{
|
||||||
>(`/customer-branch/${id}`, playload, {
|
headers: {
|
||||||
headers: {
|
'X-Session-Id': flow?.sessionId,
|
||||||
'X-Session-Id': flow?.sessionId,
|
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
|
||||||
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
|
'X-Tid': flow?.transactionId,
|
||||||
'X-Tid': flow?.transactionId,
|
},
|
||||||
},
|
},
|
||||||
});
|
);
|
||||||
if (!res) return false;
|
if (!res) return false;
|
||||||
|
|
||||||
return res.data;
|
return res.data;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue