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
@@ -15,7 +15,7 @@ export const secretImportDALFactory = (db: TDbClient) => {
// we are using postion based sorting as its a small list
// this will return the last value of the position in a folder with secret imports
const findLastImportPosition = async (folderId: string, tx?: Knex) => {
const lastPos = await (tx || db)(TableName.SecretImport)
const lastPos = await (tx || db.replicaNode())(TableName.SecretImport)
.where({ folderId })
.max("position", { as: "position" })
.first();