From df62e13627dcc2b31aaa3052821574780514c635 Mon Sep 17 00:00:00 2001 From: Jordan Ramos Date: Thu, 28 May 2026 16:10:59 -0600 Subject: [PATCH] Search both teams and all dispositions in enrich-batch Search NTS-AEO-STEAM and NTS-AEO-ACCESS-ENG across confirmed, unconfirmed, and candidate dispositions. Assets that are only candidates (not yet confirmed) were previously missed. --- backend/routes/cardApi.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/routes/cardApi.js b/backend/routes/cardApi.js index bc71039..620e8b7 100644 --- a/backend/routes/cardApi.js +++ b/backend/routes/cardApi.js @@ -586,13 +586,16 @@ function createCardApiRouter() { // Strategy: fetch team assets (paginated) and match against our target IPs. // The team assets endpoint returns the full enriched record with ncim_discovery, // card_flags, netops_granite_allips, etc. - const teamName = team || 'NTS-AEO-STEAM'; - const dispositions = ['confirmed', 'unconfirmed']; + const teams = team ? [team] : ['NTS-AEO-STEAM', 'NTS-AEO-ACCESS-ENG']; + const dispositions = ['confirmed', 'unconfirmed', 'candidate']; let foundCount = 0; - for (const disposition of dispositions) { + for (const teamName of teams) { if (foundCount >= targetIps.size) break; + for (const disposition of dispositions) { + if (foundCount >= targetIps.size) break; + let page = 1; const pageSize = 200; let hasMore = true; @@ -635,6 +638,7 @@ function createCardApiRouter() { } } } + } // Build results array in the same order as input IPs const results = [];