From bbafca329cf4c4d1f964e32bbfd08c1f5627c050 Mon Sep 17 00:00:00 2001 From: Davide Bizzi Date: Mon, 8 Jul 2024 12:05:18 +0200 Subject: [PATCH] fix: Use where like explicit --- .../campaigns/campaignId/candidates/_get/CandidateDevices.ts | 2 +- src/routes/users/by-role/role/_get/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/campaigns/campaignId/candidates/_get/CandidateDevices.ts b/src/routes/campaigns/campaignId/candidates/_get/CandidateDevices.ts index 332199bfb..7bd45652c 100644 --- a/src/routes/campaigns/campaignId/candidates/_get/CandidateDevices.ts +++ b/src/routes/campaigns/campaignId/candidates/_get/CandidateDevices.ts @@ -78,7 +78,7 @@ class CandidateDevices implements CandidateData { const operativeSystems = this.filters.os; deviceQuery.where((query) => { for (const os of operativeSystems) { - query.orWhereLike("wp_appq_evd_platform.name", `%${os}%`); + query.orWhere("wp_appq_evd_platform.name", "LIKE", `%${os}%`); } }); } diff --git a/src/routes/users/by-role/role/_get/index.ts b/src/routes/users/by-role/role/_get/index.ts index 55e3007e1..3eb061ffd 100644 --- a/src/routes/users/by-role/role/_get/index.ts +++ b/src/routes/users/by-role/role/_get/index.ts @@ -62,7 +62,7 @@ export default class Route extends UserRoute<{ }) .andWhere((query) => { for (const role of roles) { - query.orWhereLike("meta_value", `%${role}%`); + query.orWhere("meta_value", "LIKE", `%${role}%`); } }); @@ -138,7 +138,7 @@ export default class Route extends UserRoute<{ .where({ meta_key: "wp_capabilities", }) - .whereLike("meta_value", `%${this.roleName}%`); + .where("meta_value", "LIKE", `%${this.roleName}%`); const results = users .filter((user) => {