mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat: wip import resource
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user