feat: consolidate provider API sources with heuristic support
Docker / build (push) Failing after 18s
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:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user