Fix military aircraft classification regex to reduce false positives (issue-1)

This commit is contained in:
2026-09-16 23:36:58 -04:00
parent 4520447156
commit cf693e6f08
+1 -1
View File
@@ -220,7 +220,7 @@ async function syncMilitaryIcao() {
try { try {
const page = await fetch(ADSB_URL + ':8080').then(resp => resp.text()); const page = await fetch(ADSB_URL + ':8080').then(resp => resp.text());
const db = /databaseFolder = "(db-.+?)"/.exec(page); const db = /databaseFolder = "(db-.+?)"/.exec(page);
const res = await fetch(ADSB_URL + `${db[1]}/ranges.js`); const res = await fetch(ADSB_URL + `:8080/${db[1]}/ranges.js`);
if (!res.ok) throw new Error(`HTTP ${res.status}`); if (!res.ok) throw new Error(`HTTP ${res.status}`);
const { military } = await res.json(); const { military } = await res.json();
db.exec('DELETE FROM military_ranges'); db.exec('DELETE FROM military_ranges');