feat(core-flows,medusa,types,utils): rename psma to prices (#6796)
What: Renames pricesetmoneyamount to prices Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
This commit is contained in:
co-authored by
Adrien de Peretti
parent
fbc369705d
commit
9073d7aba3
@@ -5,11 +5,10 @@ export async function getVariantsFromPriceList(
|
||||
priceListId: string
|
||||
) {
|
||||
const remoteQuery = container.resolve("remoteQuery")
|
||||
|
||||
const query = {
|
||||
price_list: {
|
||||
__args: { id: [priceListId] },
|
||||
price_set_money_amounts: {
|
||||
prices: {
|
||||
price_set: {
|
||||
variant_link: { variant: { fields: ["id", "product_id"] } },
|
||||
},
|
||||
@@ -21,8 +20,8 @@ export async function getVariantsFromPriceList(
|
||||
const variants: ProductVariantDTO[] = []
|
||||
|
||||
priceLists.forEach((priceList) => {
|
||||
priceList.price_set_money_amounts?.forEach((psma) => {
|
||||
const variant = psma.price_set?.variant_link?.variant
|
||||
priceList.prices?.forEach((price) => {
|
||||
const variant = price.price_set?.variant_link?.variant
|
||||
|
||||
if (variant) {
|
||||
variants.push(variant)
|
||||
|
||||
Reference in New Issue
Block a user