We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d2076a commit c14b17cCopy full SHA for c14b17c
src/common/interceptor/transaction.interceptor.ts
@@ -11,7 +11,6 @@ import {
11
concatMap,
12
} from 'rxjs';
13
import { QueryRunner, DataSource } from 'typeorm';
14
-// import { Request } from 'express';
15
16
@Injectable()
17
export class TransactionInterceptor implements NestInterceptor {
@@ -28,16 +27,13 @@ export class TransactionInterceptor implements NestInterceptor {
28
27
return next.handle().pipe(
29
concatMap(async (data) => {
30
await queryRunner.commitTransaction();
31
- console.log('data', data);
32
return data;
33
}),
34
catchError(async (error) => {
35
- console.log('error', error);
36
await queryRunner.rollbackTransaction();
37
throw error;
38
39
finalize(async () => {
40
- console.log('finalize');
41
await queryRunner.release();
42
43
);
0 commit comments