chore: fix interfaces for product module (#5387)
Some changes based on @shahednasser's PR - https://github.com/medusajs/medusa/pull/5341
This commit is contained in:
@@ -446,7 +446,11 @@ export default class ProductModuleService<
|
||||
sharedContext
|
||||
)
|
||||
|
||||
return JSON.parse(JSON.stringify(productOptions))
|
||||
return await this.baseRepository_.serialize<
|
||||
ProductTypes.ProductOptionDTO[]
|
||||
>(productOptions, {
|
||||
populate: true,
|
||||
})
|
||||
}
|
||||
|
||||
@InjectTransactionManager(shouldForceTransaction, "baseRepository_")
|
||||
@@ -459,7 +463,11 @@ export default class ProductModuleService<
|
||||
sharedContext
|
||||
)
|
||||
|
||||
return JSON.parse(JSON.stringify(productOptions))
|
||||
return await this.baseRepository_.serialize<
|
||||
ProductTypes.ProductOptionDTO[]
|
||||
>(productOptions, {
|
||||
populate: true,
|
||||
})
|
||||
}
|
||||
|
||||
@InjectTransactionManager(shouldForceTransaction, "baseRepository_")
|
||||
|
||||
Reference in New Issue
Block a user