feat: kms service changes for db change

This commit is contained in:
=
2024-07-10 12:48:35 +05:30
parent 71c49c8b90
commit 7ca7a95070
8 changed files with 260 additions and 41 deletions
+2 -2
View File
@@ -207,9 +207,9 @@ export const orgDALFactory = (db: TDbClient) => {
}
};
const updateById = async (orgId: string, data: Partial<TOrganizations>) => {
const updateById = async (orgId: string, data: Partial<TOrganizations>, tx?: Knex) => {
try {
const [org] = await db(TableName.Organization)
const [org] = await (tx || db)(TableName.Organization)
.where({ id: orgId })
.update({ ...data })
.returning("*");