refactor: ดักค่า code ไม่ให้ส่งตอนสร้าง

This commit is contained in:
Net 2024-07-04 13:29:11 +07:00
parent 417f3ef422
commit 311ec7d2d0

View file

@ -307,13 +307,15 @@ const useCustomerStore = defineStore('api-customer', () => {
transactionId?: string;
},
) {
const { code, ...playload } = data;
const res = await api.post<
Customer & {
branch: CustomerBranch[];
imageUrl: string;
imageUploadUrl: string;
}
>('/customer-branch', data, {
>('/customer-branch', playload, {
headers: {
'X-Session-Id': flow?.sessionId,
'X-Rtid': flow?.refTransactionId || flowStore.rtid,