refactor(medusa): Cleanup and fix CartService (#1306)

* refactor(medusa): Cleanup + fix

* styles(medusa): Lint

* refactor(medusa): Finalize cleanup

* feat(medusa): Prefer the usage of bulk operations instead of sequential/conccurent operations

* feat(medusa): Improve cart service

* refactor(medusa): Explicitly specifying protected methods when needed as well as enfore the usage of the local transactionManager_ in those methods

* tests(medusa): Fix tests according to the new changes

* feat(medusa): Cleanup after rebase

* test(medusa): Fix cart service tests
This commit is contained in:
Adrien de Peretti
2022-04-13 18:35:13 +02:00
committed by GitHub
parent 3f19a3c4d5
commit 12c06b4c9d
12 changed files with 1142 additions and 995 deletions
@@ -228,8 +228,7 @@ class BaseService {
}
try {
const result = await this.manager_.transaction((m) => doWork(m))
return result
return await this.manager_.transaction((m) => doWork(m))
} catch (error) {
if (errorHandler) {
const result = await errorHandler(error)