fix: restore LABELS const

This commit is contained in:
Manohar 2026-05-15 04:20:30 +00:00
parent 64c222b172
commit b41839e529

View file

@ -28,6 +28,9 @@ async function searchToken(exchange: string, query: string): Promise<string | nu
} catch { return null; } } catch { return null; }
} }
const LABELS: Record<string, { label: string; unit: string }> = {};
for (const t of INDEX_TOKENS) { LABELS[t.key] = { label: t.label, unit: t.unit }; }
function saveToCache(quotes: MarketQuote[]): void { function saveToCache(quotes: MarketQuote[]): void {
const upsert = db.prepare(`INSERT INTO market_cache (key,label,price,change_val,change_pct,unit,cached_at) const upsert = db.prepare(`INSERT INTO market_cache (key,label,price,change_val,change_pct,unit,cached_at)
VALUES (@key,@label,@price,@change_val,@change_pct,@unit,datetime('now')) VALUES (@key,@label,@price,@change_val,@change_pct,@unit,datetime('now'))