From 99bebcb97b9eecc659bb642fbe6b7afdcd98b16f Mon Sep 17 00:00:00 2001 From: Piyush Gupta Date: Thu, 9 Oct 2025 19:03:44 +0530 Subject: [PATCH] chore: refactor --- backend/src/services/identity/identity-dal.ts | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/backend/src/services/identity/identity-dal.ts b/backend/src/services/identity/identity-dal.ts index 56224bd57..a2e4995ca 100644 --- a/backend/src/services/identity/identity-dal.ts +++ b/backend/src/services/identity/identity-dal.ts @@ -72,26 +72,5 @@ export const identityDALFactory = (db: TDbClient) => { } }; - const countIdentitiesByFilter = async ({ searchTerm }: { searchTerm: string }) => { - interface CountResult { - count: string; - } - try { - const count = await db - .replicaNode()(TableName.Identity) - .where((qb) => { - if (searchTerm) { - void qb.whereILike(`name`, `%${searchTerm}%`); - } - }) - .count("*") - .first(); - - return parseInt((count as unknown as CountResult).count || "0", 10); - } catch (error) { - throw new DatabaseError({ error, name: "Count identities by filter" }); - } - }; - - return { ...identityOrm, getTrustedIpsByAuthMethod, getIdentitiesByFilter, countIdentitiesByFilter }; + return { ...identityOrm, getTrustedIpsByAuthMethod, getIdentitiesByFilter }; };