File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 66 SelectQueryBuilder ,
77 QueryRunner ,
88 SaveOptions ,
9- DeepPartial ,
9+ RemoveOptions ,
1010} from 'typeorm' ;
1111import { getConnection } from '../../util/database.connection' ;
1212
@@ -75,4 +75,9 @@ export class BaseRepository<T extends ObjectLiteral> extends Repository<T> {
7575 const repository = await this . getDynamicRepository ( ) ;
7676 return repository . save ( entity , options ) ;
7777 }
78+
79+ async remove ( entity : any , options ?: RemoveOptions ) : Promise < any > {
80+ const repository = await this . getDynamicRepository ( ) ;
81+ return repository . remove ( entity , options ) ;
82+ }
7883}
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ export class UserService implements UserServiceInterface {
202202 } ) ) ,
203203 ) ;
204204
205- const userPermissionsUpdated = await this . dataSource . transaction (
205+ const userPermissionsUpdated = await ( await getConnection ( ) ) . transaction (
206206 async ( entityManager ) => {
207207 const userPermissionsRepo = entityManager . getRepository ( UserPermission ) ;
208208 await userPermissionsRepo . remove ( userPermissionsToBeRemoved ) ;
You can’t perform that action at this time.
0 commit comments