feat: Update the signatures for variants and options to follow convention (#6748)
This commit is contained in:
@@ -27,7 +27,7 @@ export async function updateProductVariants({
|
||||
}
|
||||
|
||||
if (updateVariantsData.length) {
|
||||
await productModuleService.updateVariants(updateVariantsData)
|
||||
await productModuleService.upsertVariants(updateVariantsData)
|
||||
}
|
||||
|
||||
return productsVariants
|
||||
|
||||
@@ -25,9 +25,10 @@ export const updateProductOptionsStep = createStep(
|
||||
relations,
|
||||
})
|
||||
|
||||
// TODO: We need to update the module's signature
|
||||
// const productOptions = await service.updateOptions(data.selector, data.update)
|
||||
const productOptions = []
|
||||
const productOptions = await service.updateOptions(
|
||||
data.selector,
|
||||
data.update
|
||||
)
|
||||
return new StepResponse(productOptions, prevData)
|
||||
},
|
||||
async (prevData, { container }) => {
|
||||
@@ -39,11 +40,6 @@ export const updateProductOptionsStep = createStep(
|
||||
ModuleRegistrationName.PRODUCT
|
||||
)
|
||||
|
||||
// TODO: We need to update the module's signature
|
||||
// await service.upsertOptions(
|
||||
// prevData.map((r) => ({
|
||||
// ...r,
|
||||
// }))
|
||||
// )
|
||||
await service.upsertOptions(prevData)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -25,9 +25,10 @@ export const updateProductVariantsStep = createStep(
|
||||
relations,
|
||||
})
|
||||
|
||||
// TODO: We need to update the module's signature
|
||||
// const productVariants = await service.updateVariants(data.selector, data.update)
|
||||
const productVariants = []
|
||||
const productVariants = await service.updateVariants(
|
||||
data.selector,
|
||||
data.update
|
||||
)
|
||||
return new StepResponse(productVariants, prevData)
|
||||
},
|
||||
async (prevData, { container }) => {
|
||||
@@ -39,11 +40,6 @@ export const updateProductVariantsStep = createStep(
|
||||
ModuleRegistrationName.PRODUCT
|
||||
)
|
||||
|
||||
// TODO: We need to update the module's signature
|
||||
// await service.upsertVariants(
|
||||
// prevData.map((r) => ({
|
||||
// ...r,
|
||||
// }))
|
||||
// )
|
||||
await service.upsertVariants(prevData)
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user