remove api-key-org association for root keys

This commit is contained in:
miloschwartz
2025-08-01 15:55:47 -07:00
parent 6d359b6bb9
commit 7402590f49
11 changed files with 47 additions and 26 deletions

View File

@@ -215,7 +215,7 @@ export async function createOrg(
orgId: newOrg[0].orgId,
roleId: roleId,
isOwner: true
});
});
}
const memberRole = await trx
@@ -234,18 +234,6 @@ export async function createOrg(
orgId
}))
);
const rootApiKeys = await trx
.select()
.from(apiKeys)
.where(eq(apiKeys.isRoot, true));
for (const apiKey of rootApiKeys) {
await trx.insert(apiKeyOrg).values({
apiKeyId: apiKey.apiKeyId,
orgId: newOrg[0].orgId
});
}
});
if (!org) {