Add name and lock client to specific olm

This commit is contained in:
Owen
2025-11-03 16:16:19 -08:00
parent d30743a428
commit 2c488baa80
8 changed files with 95 additions and 82 deletions

View File

@@ -201,7 +201,8 @@ export async function createClient(
orgId,
name,
subnet: updatedSubnet,
type
type,
olmId // this is to lock it to a specific olm even if the olm moves across clients
})
.returning();
@@ -228,15 +229,6 @@ export async function createClient(
);
}
const secretHash = await hashPassword(secret);
await trx.insert(olms).values({
olmId,
secretHash,
clientId: newClient.clientId,
dateCreated: moment().toISOString()
});
return response<CreateClientResponse>(res, {
data: newClient,
success: true,