Closed vitaly-t closed 6 years ago
@vitaly-t , thanks for swooping in! I could have sworn that the simple way wasn't working, but it certainly does now.
You are welcome!
b.t.w. tasks are not needed when executing just one query ;)
https://github.com/falling-fruit/api/blob/888d7af3c51718af311e2ed8ad1c2b7d9e1d50ca/index.js#L34
@vitaly-t noted and acted on!
you do not need to use
(task || this.db)
in your repositories, because you are following the Repository pattern, which already provides tasks/transactions context automatically where needed.