From 3f5387c26cb9621c656e9f75ca40002285f38431 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:34:28 +0700 Subject: [PATCH] fix: type --- src/stores/customer/index.ts | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/src/stores/customer/index.ts b/src/stores/customer/index.ts index c861eedd..4f273502 100644 --- a/src/stores/customer/index.ts +++ b/src/stores/customer/index.ts @@ -309,13 +309,7 @@ const useCustomerStore = defineStore('api-customer', () => { ) { const { id, statusSave, code, ...playload } = data; - const res = await api.post< - Customer & { - branch: CustomerBranch[]; - imageUrl: string; - imageUploadUrl: string; - } - >('/customer-branch', playload, { + const res = await api.post('/customer-branch', playload, { headers: { 'X-Session-Id': flow?.sessionId, 'X-Rtid': flow?.refTransactionId || flowStore.rtid, @@ -338,17 +332,17 @@ const useCustomerStore = defineStore('api-customer', () => { ) { const { code, branchNo, ...playload } = data; - const res = await api.put< - Customer & { - branch: CustomerBranch[]; - } - >(`/customer-branch/${id}`, playload, { - headers: { - 'X-Session-Id': flow?.sessionId, - 'X-Rtid': flow?.refTransactionId || flowStore.rtid, - 'X-Tid': flow?.transactionId, + const res = await api.put( + `/customer-branch/${id}`, + playload, + { + headers: { + 'X-Session-Id': flow?.sessionId, + 'X-Rtid': flow?.refTransactionId || flowStore.rtid, + 'X-Tid': flow?.transactionId, + }, }, - }); + ); if (!res) return false; return res.data;