hotfix(medusa): wrap update-product in transaction (#182)

This commit is contained in:
Oliver Windall Juhl
2021-02-27 10:24:46 +01:00
committed by GitHub
parent 999e8053ea
commit ed5b1592a4

View File

@@ -90,8 +90,11 @@ export default async (req, res) => {
try {
const productService = req.scope.resolve("productService")
const entityManager = req.scope.resolve("manager")
await productService.update(id, value)
await entityManager.transaction(async manager => {
await productService.withTransaction(manager).update(id, value)
})
const product = await productService.retrieve(id, {
select: defaultFields,