diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2024-02-26 15:12:12 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2024-02-26 15:12:12 +0700 |
| commit | a698514b32353d8f6386ce8ba8c20941ab65f569 (patch) | |
| tree | 0c60dc5897b5fb5936025342ae24d8b115f024ce /src-migrate/modules/cart | |
| parent | 55d476a4666150a013a308deb6cb99513778ac22 (diff) | |
Add qty append on upsert cart api
Diffstat (limited to 'src-migrate/modules/cart')
| -rw-r--r-- | src-migrate/modules/cart/components/ItemSelect.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src-migrate/modules/cart/components/ItemSelect.tsx b/src-migrate/modules/cart/components/ItemSelect.tsx index 1d8886a2..b904a1de 100644 --- a/src-migrate/modules/cart/components/ItemSelect.tsx +++ b/src-migrate/modules/cart/components/ItemSelect.tsx @@ -21,7 +21,13 @@ const CartItemSelect = ({ item }: Props) => { if (typeof auth !== 'object') return setIsLoad(true) - await upsertUserCart(auth.id, item.cart_type, item.id, item.quantity, e.target.checked) + await upsertUserCart({ + userId: auth.id, + type: item.cart_type, + id: item.id, + qty: item.quantity, + selected: e.target.checked + }) await loadCart(auth.id) setIsLoad(false) } |
