From 5cf13a963d62bfc040119acb4d52447bfa07ff06 Mon Sep 17 00:00:00 2001 From: Owen Date: Wed, 25 Feb 2026 15:29:37 -0800 Subject: [PATCH] Add missing saving username --- server/private/routers/ssh/signSshKey.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/private/routers/ssh/signSshKey.ts b/server/private/routers/ssh/signSshKey.ts index 13a7fe66..aa556228 100644 --- a/server/private/routers/ssh/signSshKey.ts +++ b/server/private/routers/ssh/signSshKey.ts @@ -185,6 +185,17 @@ export async function signSshKey( ) ); } + + // save it to the database for future use so we dont have to keep doing this + await db + .update(userOrgs) + .set({ pamUsername: usernameToUse }) + .where( + and( + eq(userOrgs.orgId, orgId), + eq(userOrgs.userId, userId) + ) + ); } else { return next( createHttpError(