From f8717b3d01454457218f6cf01ff813c88ccc9cd3 Mon Sep 17 00:00:00 2001 From: Thanaphon Frappet Date: Thu, 14 Nov 2024 11:30:00 +0700 Subject: [PATCH] refactor: handle zipcode --- src/stores/user/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stores/user/index.ts b/src/stores/user/index.ts index 12c61ded..f25829ff 100644 --- a/src/stores/user/index.ts +++ b/src/stores/user/index.ts @@ -372,7 +372,9 @@ const useUserStore = defineStore('api-user', () => { transactionId?: string; }, ) { - const res = await api.put(`/user/${id}`, data, { + const { zipCode, ...paylond } = data; + + const res = await api.put(`/user/${id}`, paylond, { headers: { 'X-Session-Id': flow?.sessionId, 'X-Rtid': flow?.refTransactionId || flowStore.rtid,