From ccf5687d5a1efe23c99c99543891b4bad1022469 Mon Sep 17 00:00:00 2001 From: DuvCharles Date: Tue, 28 Nov 2023 17:42:56 +0100 Subject: [PATCH] :sparkles: remove cart item --- lib/sylius/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/sylius/index.ts b/lib/sylius/index.ts index 9e56f6e674..270c1027cf 100644 --- a/lib/sylius/index.ts +++ b/lib/sylius/index.ts @@ -172,7 +172,9 @@ export const addToCart = async (cartId: string | undefined, payload: AddToCartPa quantity: payload[0]?.quantity }); }; -export const removeFromCart = () => {}; +export const removeFromCart = async (cartId: string, itemIds: string[]) => { + await syliusRequest(REST_METHODS.DELETE, `/orders/${cartId}/items/${itemIds[0]}`); +}; export const updateCart = async (cartId: string, payload: UpdateCartPayload[]) => { await syliusRequest(