Compare commits
1 Commits
developmen
...
fix/base
Author | SHA1 | Date |
---|---|---|
|
6846d73611 |
|
@ -60,7 +60,7 @@ export abstract class BaseManager {
|
||||||
try {
|
try {
|
||||||
this.setUser();
|
this.setUser();
|
||||||
|
|
||||||
// this.queryRunner.startTransaction();
|
this.queryRunner.startTransaction();
|
||||||
this.baseLog.verbose('prepareData');
|
this.baseLog.verbose('prepareData');
|
||||||
await this.prepareData();
|
await this.prepareData();
|
||||||
|
|
||||||
|
@ -80,11 +80,12 @@ export abstract class BaseManager {
|
||||||
this.baseLog.verbose('afterProcess');
|
this.baseLog.verbose('afterProcess');
|
||||||
await this.afterProcess();
|
await this.afterProcess();
|
||||||
|
|
||||||
// this.baseLog.verbose('commitTransaction');
|
this.baseLog.verbose('commitTransaction');
|
||||||
// await this.queryRunner.commitTransaction();
|
await this.queryRunner.commitTransaction();
|
||||||
|
|
||||||
// await this.queryRunner.release();
|
await this.queryRunner.release();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
await this.queryRunner.rollbackTransaction();
|
||||||
if (e.response) throw new Error(JSON.stringify(e.response));
|
if (e.response) throw new Error(JSON.stringify(e.response));
|
||||||
else throw new Error(e.message);
|
else throw new Error(e.message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue