feat: consolidate provider API sources with heuristic support
Docker / build (push) Failing after 18s

Updated the database migration logic to consolidate provider API sources from both accounts and heuristic methods for BILLmanager URLs. Replaced direct calls to `consolidateProviderApiFromAccounts` with `consolidateAllProviderApiSources` in relevant routes to ensure comprehensive API data handling.
This commit is contained in:
Denozordec
2026-03-21 01:01:09 +07:00
parent 28d723983e
commit ec038242bf
3 changed files with 57 additions and 8 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { Router } from 'express'
import { getDb, saveDb } from '../db.js'
import { consolidateProviderApiFromAccounts } from '../db/migrations.js'
import { consolidateAllProviderApiSources } from '../db/migrations.js'
const router = Router()
@@ -72,7 +72,7 @@ router.post('/', (req, res) => {
db.run(sql, s.id ?? 'settings-main', s.baseCurrency ?? 'RUB', s.ratesUrl ?? '', s.autoConvert !== false ? 1 : 0, s.ratesUpdatedAt ?? '', s.syncEnabled ? 1 : 0, s.syncIntervalMinutes ?? 60)
}
}
consolidateProviderApiFromAccounts(db)
consolidateAllProviderApiSources(db)
saveDb()
res.json({ ok: true })