mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 14:34:09 +00:00
feat(api): manage users in org and project level without waiting for confirmation
This commit is contained in:
@@ -82,10 +82,9 @@ export const userDALFactory = (db: TDbClient) => {
|
||||
}
|
||||
};
|
||||
|
||||
const findUserEncKeyByUserId = async (userId: string) => {
|
||||
const findUserEncKeyByUserId = async (userId: string, tx?: Knex) => {
|
||||
try {
|
||||
const user = await db
|
||||
.replicaNode()(TableName.Users)
|
||||
const user = await (tx || db.replicaNode())(TableName.Users)
|
||||
.where(`${TableName.Users}.id`, userId)
|
||||
.join(TableName.UserEncryptionKey, `${TableName.Users}.id`, `${TableName.UserEncryptionKey}.userId`)
|
||||
.first();
|
||||
|
||||
Reference in New Issue
Block a user