feat(core-flows,types,utils,medusa): Update existing line items when adding the same variant to cart (#7470)

* feat(core-flows,types,utils,medusa): Update existing line items when adding the same variant to cart

* chore: split steps into 2 for add-to-cart

* chore: split steps into 2 for add-to-cart

* chore: iterate safely

* chore: parallelize upsert
This commit is contained in:
Riqwan Thamir
2024-05-27 17:54:11 +02:00
committed by GitHub
parent 81c27e3524
commit 7baedf73d5
16 changed files with 339 additions and 49 deletions

View File

@@ -37,7 +37,6 @@ import {
CreateShippingMethodDTO,
CreateShippingMethodTaxLineDTO,
UpdateLineItemDTO,
UpdateLineItemTaxLineDTO,
UpdateShippingMethodTaxLineDTO,
} from "@types"
import { entityNameToLinkableKeysMap, joinerConfig } from "../joiner-config"
@@ -1034,7 +1033,7 @@ export default class CartModuleService<
}
const result = await this.lineItemTaxLineService_.upsert(
taxLines as UpdateLineItemTaxLineDTO[],
taxLines,
sharedContext
)