Skip to content

Commit ad7ee85

Browse files
committed
fix(credentials): use tx instead of db for permissions query inside transaction
1 parent 78b6c88 commit ad7ee85

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/sim/app/api/credentials/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
534534
})
535535

536536
if ((type === 'env_workspace' || type === 'service_account') && workspaceRow?.ownerId) {
537-
const wsPermissionRows = await db
537+
const wsPermissionRows = await tx
538538
.select({ userId: permissions.userId, permissionType: permissions.permissionType })
539539
.from(permissions)
540540
.where(

0 commit comments

Comments
 (0)