refactor: handle zipcode

This commit is contained in:
Thanaphon Frappet 2024-11-14 11:30:00 +07:00
parent de97a348e7
commit f8717b3d01

View file

@ -372,7 +372,9 @@ const useUserStore = defineStore('api-user', () => {
transactionId?: string;
},
) {
const res = await api.put<User>(`/user/${id}`, data, {
const { zipCode, ...paylond } = data;
const res = await api.put<User>(`/user/${id}`, paylond, {
headers: {
'X-Session-Id': flow?.sessionId,
'X-Rtid': flow?.refTransactionId || flowStore.rtid,