From 4701da201d83b9a005909a267bb10eeacd81691c Mon Sep 17 00:00:00 2001 From: Owen Date: Sun, 10 Aug 2025 10:09:52 -0700 Subject: [PATCH] Fix a few consts to lets --- server/routers/idp/validateOidcCallback.ts | 4 ++-- server/routers/target/helpers.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/routers/idp/validateOidcCallback.ts b/server/routers/idp/validateOidcCallback.ts index 3a643386..9991ba9c 100644 --- a/server/routers/idp/validateOidcCallback.ts +++ b/server/routers/idp/validateOidcCallback.ts @@ -238,7 +238,7 @@ export async function validateOidcCallback( const defaultRoleMapping = existingIdp.idp.defaultRoleMapping; const defaultOrgMapping = existingIdp.idp.defaultOrgMapping; - const userOrgInfo: { orgId: string; roleId: number }[] = []; + let userOrgInfo: { orgId: string; roleId: number }[] = []; for (const org of allOrgs) { const [idpOrgRes] = await db .select() @@ -314,7 +314,7 @@ export async function validateOidcCallback( let existingUserId = existingUser?.userId; - const orgUserCounts: { orgId: string; userCount: number }[] = []; + let orgUserCounts: { orgId: string; userCount: number }[] = []; // sync the user with the orgs and roles await db.transaction(async (trx) => { diff --git a/server/routers/target/helpers.ts b/server/routers/target/helpers.ts index e5aa2ba9..aa45d8ba 100644 --- a/server/routers/target/helpers.ts +++ b/server/routers/target/helpers.ts @@ -15,8 +15,8 @@ export async function pickPort(siteId: number): Promise<{ // TODO: is this all inefficient? // Fetch targets for all resources of this site - const targetIps: string[] = []; - const targetInternalPorts: number[] = []; + let targetIps: string[] = []; + let targetInternalPorts: number[] = []; await Promise.all( resourcesRes.map(async (resource) => { const targetsRes = await db