mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 07:07:21 +00:00
fix: prevent conditions overlapping by adding parenthesis to search condition
This commit is contained in:
@ -52,7 +52,7 @@ export class BookableSpaceService {
|
||||
|
||||
if (search) {
|
||||
qb = qb.andWhere(
|
||||
'space.spaceName ILIKE :search OR community.name ILIKE :search OR parentSpace.spaceName ILIKE :search',
|
||||
'(space.spaceName ILIKE :search OR community.name ILIKE :search OR parentSpace.spaceName ILIKE :search)',
|
||||
{ search: `%${search}%` },
|
||||
);
|
||||
}
|
||||
@ -68,7 +68,6 @@ export class BookableSpaceService {
|
||||
.leftJoinAndSelect('space.bookableConfig', 'bookableConfig')
|
||||
.andWhere('bookableConfig.uuid IS NULL');
|
||||
}
|
||||
|
||||
const customModel = TypeORMCustomModel(this.spaceRepository);
|
||||
|
||||
const { baseResponseDto, paginationResponseDto } =
|
||||
|
Reference in New Issue
Block a user