mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-08 05:56:38 +00:00
Add name and lock client to specific olm
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user