(item: CartItem)
| 32 | } |
| 33 | |
| 34 | export async function removeFromCart(item: CartItem) { |
| 35 | const cartId = await getCartId() |
| 36 | await fetch(`${BACKEND_URL}/api/cart/${cartId.value}`, { |
| 37 | method: 'DELETE', |
| 38 | headers: { 'Content-Type': 'application/json' }, |
| 39 | body: JSON.stringify(item), |
| 40 | }) |
| 41 | revalidatePath('/cart') |
| 42 | } |
no test coverage detected