@@ -11,10 +11,9 @@ import { EntityRepository } from "@mikro-orm/postgresql";
11
11
import { BadRequestException , NotFoundException } from "@nestjs/common" ;
12
12
import type { Observable } from "rxjs" ;
13
13
import { from , map , of , switchMap , throwError } from "rxjs" ;
14
+ import { formatSearch } from "helper-fns" ;
14
15
import type { BaseEntity } from "./base.entity" ;
15
16
16
- import { translate } from "@lib/i18n" ;
17
- import { HelperService } from "@common/helpers" ;
18
17
import type {
19
18
CursorPaginationResponse ,
20
19
OppositeOrder ,
@@ -31,6 +30,7 @@ import {
31
30
getOppositeOrder ,
32
31
getQueryOrder ,
33
32
} from "@common/@types" ;
33
+ import { translate } from "@lib/i18n" ;
34
34
35
35
export class BaseRepository < T extends BaseEntity > extends EntityRepository < T > {
36
36
private readonly encoding : BufferEncoding = "base64" ;
@@ -291,7 +291,7 @@ export class BaseRepository<T extends BaseEntity> extends EntityRepository<T> {
291
291
if ( search ) {
292
292
qb . andWhere ( {
293
293
[ searchField ] : {
294
- $ilike : HelperService . formatSearch ( search ) ,
294
+ $ilike : formatSearch ( search ) ,
295
295
} ,
296
296
} ) ;
297
297
}
@@ -366,7 +366,7 @@ export class BaseRepository<T extends BaseEntity> extends EntityRepository<T> {
366
366
if ( search && searchField ) {
367
367
qb . andWhere ( {
368
368
[ searchField ] : {
369
- $ilike : HelperService . formatSearch ( search ) ,
369
+ $ilike : formatSearch ( search ) ,
370
370
} ,
371
371
} ) ;
372
372
}
0 commit comments