From 7a4d2462d05b2cc0e9c66551f1e2c16d4abace2f Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Mon, 26 Feb 2024 15:16:28 +0700 Subject: Update upsert user cart --- src-migrate/modules/cart/components/ItemAction.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src-migrate/modules/cart/components/ItemAction.tsx b/src-migrate/modules/cart/components/ItemAction.tsx index 859c758c..e73d507b 100644 --- a/src-migrate/modules/cart/components/ItemAction.tsx +++ b/src-migrate/modules/cart/components/ItemAction.tsx @@ -51,7 +51,13 @@ const CartItemAction = ({ item }: Props) => { if (typeof auth !== 'object' || isNaN(debounceQty)) return setIsLoadQuantity(true) - await upsertUserCart(auth.id, item.cart_type, item.id, debounceQty, item.selected) + await upsertUserCart({ + userId: auth.id, + type: item.cart_type, + id: item.id, + qty: debounceQty, + selected: item.selected, + }) await loadCart(auth.id) setIsLoadQuantity(false) } -- cgit v1.2.3