Skip to content

Commit

Permalink
feat: add name filtering to project
Browse files Browse the repository at this point in the history
  • Loading branch information
adkif committed Sep 26, 2024
1 parent 57015c2 commit d6930df
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BadRequestException, ForbiddenException, Injectable } from '@nestjs/common';
import { EventBus } from '@nestjs/cqrs';
import { In, IsNull, SelectQueryBuilder } from 'typeorm';
import { ILike, In, IsNull, SelectQueryBuilder } from 'typeorm';
import {
ActionTypeEnum,
ActivityLogEntityEnum,
Expand Down Expand Up @@ -423,6 +423,10 @@ export class OrganizationProjectService extends TenantAwareCrudService<Organizat
};
}

if (options?.where?.name) {
options.where.name = ILike(`%${options.where.name}%`);
}

// Call the parent class's paginate method with the modified options
return super.paginate(options);
}
Expand Down

0 comments on commit d6930df

Please sign in to comment.