fix: query
This commit is contained in:
parent
7cf75edf76
commit
3211cbe8b7
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ export class ProductServiceController extends Controller {
|
|||
const or: Prisma.Sql[] = [];
|
||||
const and: Prisma.Sql[] = [];
|
||||
|
||||
if (query) or.push(Prisma.sql`"name" LIKE '%${query}%'`);
|
||||
if (query) or.push(Prisma.sql`"name" LIKE ${`%${query}%`}`);
|
||||
if (status) and.push(Prisma.sql`"status" = ${status}::"Status"`);
|
||||
if (productTypeId) {
|
||||
and.push(Prisma.sql`("productTypeId" = ${productTypeId} OR ("type" = 'service'))`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue