fix(): update cart line item route fetching (#13477)

**What**
Remove cart fetching before workflow which fetch the cart as well
This commit is contained in:
Adrien de Peretti authored and GitHub committed 2025-09-11 10:12:13 +00:00
1 parent d828005354
commit 29dca1ca48
3 files changed
+15 -30

No files matched your search

@@ -134,6 +134,13 @@ export const updateLineItemInCartWorkflow = createWorkflow(
input: UpdateLineItemInCartWorkflowInputDTO & AdditionalData
}) => {
const item = data.cart.items.find((i) => i.id === data.input.item_id)!
if (!item) {
throw new MedusaError(
MedusaError.Types.NOT_FOUND,
`Line item with id: ${data.input.item_id} was not found`
)
}
const variantIds = [item?.variant_id].filter(Boolean)
return { item, variantIds }
}