diff --git a/server/src/adsb.mjs b/server/src/adsb.mjs index 37906d8..ed8b818 100644 --- a/server/src/adsb.mjs +++ b/server/src/adsb.mjs @@ -116,7 +116,7 @@ export async function initAircraftDb() { }); insertMany(csv.map(row => ({ - icao: (row.icao || '').toUpperCase(), + icao: (row.icao24 || '').toUpperCase(), built: row.built || null, categoryDescription: row.categoryDescription || null, country: row.country || null, @@ -277,7 +277,7 @@ export async function enrichAircraft(a) { categoryDescription = COALESCE(excluded.categoryDescription, categoryDescription), class = COALESCE(excluded.class, class) `).run({ - icao: icao, + icao, registration: merged.registration || null, manufacturer: merged.manufacturer || null, aircraft: merged.aircraft || null,