feat: added back missing replica node redirect for read db operations

This commit is contained in:
=
2025-09-10 16:12:00 +05:30
parent d6f8189a96
commit e8e51fb1e1
17 changed files with 48 additions and 37 deletions
@@ -119,7 +119,7 @@ export const secretSharingDALFactory = (db: TDbClient) => {
const findActiveSharedSecrets = async (filters: Partial<TSecretSharing>, tx?: Knex) => {
try {
const now = new Date();
return await (tx || db)(TableName.SecretSharing)
return await (tx || db.replicaNode())(TableName.SecretSharing)
.where(filters)
.andWhere("expiresAt", ">", now)
.andWhere("encryptedValue", "<>", "")