diff --git a/src/controllers/product-service-controller.ts b/src/controllers/product-service-controller.ts index 669079f..95bb9ff 100644 --- a/src/controllers/product-service-controller.ts +++ b/src/controllers/product-service-controller.ts @@ -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'))`);