hotfix: wrap update-product in transaction

This commit is contained in:
olivermrbl
2021-02-23 13:02:54 +01:00
parent d0e7ebdcf1
commit 7fd89de795
@@ -87,8 +87,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,