feat: wip import resource

This commit is contained in:
Ahmed Bouhuolia
2024-03-13 02:14:25 +02:00
parent 4270d66928
commit daa1e3a6bd
13 changed files with 411 additions and 52 deletions

View File

@@ -50,11 +50,15 @@ export default class UnitOfWork {
}
try {
const result = await work(_trx);
_trx.commit();
if (!trx) {
_trx.commit();
}
return result;
} catch (error) {
_trx.rollback();
if (!trx) {
_trx.rollback();
}
throw error;
}
};