Skip to content

Commit a354e03

Browse files
authored
(fix) Get rid of unneeded filter options (#77)
1 parent 43fc075 commit a354e03

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

backend/src/services/database/utils.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,29 +51,23 @@ export class WrappedRepository<Entity extends ObjectLiteral> {
5151
return this.repository.count(options)
5252
}
5353

54-
countBy(
55-
where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[],
56-
): Promise<number> {
54+
countBy(where: FindOptionsWhere<Entity>): Promise<number> {
5755
return this.repository.countBy(where)
5856
}
5957

6058
find(options?: FindManyOptions<Entity>): Promise<Entity[]> {
6159
return this.repository.find(options)
6260
}
6361

64-
findBy(
65-
where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[],
66-
): Promise<Entity[]> {
62+
findBy(where: FindOptionsWhere<Entity>): Promise<Entity[]> {
6763
return this.repository.findBy(where)
6864
}
6965

7066
findOne(options: FindOneOptions<Entity>): Promise<Entity | null> {
7167
return this.repository.findOne(options)
7268
}
7369

74-
findOneBy(
75-
where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[],
76-
): Promise<Entity | null> {
70+
findOneBy(where: FindOptionsWhere<Entity>): Promise<Entity | null> {
7771
return this.repository.findOneBy(where)
7872
}
7973

0 commit comments

Comments
 (0)