phase-8f: persistant cache locally
This commit is contained in:
committed by
saikiranvella
parent
ff1b99910b
commit
5af9ded35e
@@ -13,10 +13,6 @@ export class FinanceController {
|
||||
private readonly advisor: PortfolioAdvisor,
|
||||
) {}
|
||||
|
||||
private static normalizeYahoo(ticker: string): string {
|
||||
return ticker.toUpperCase().replace(/\./g, '-');
|
||||
}
|
||||
|
||||
register(app: FastifyInstance): void {
|
||||
app.get('/api/finance/portfolio', this.portfolio.bind(this));
|
||||
app.post('/api/finance/holdings', { schema: holdingSchema }, this.addHolding.bind(this));
|
||||
@@ -38,7 +34,7 @@ export class FinanceController {
|
||||
|
||||
const screenable = holdings
|
||||
.filter((h) => (h.type ?? 'stock') !== 'crypto')
|
||||
.map((h) => FinanceController.normalizeYahoo(h.ticker));
|
||||
.map((h) => h.ticker.toUpperCase());
|
||||
|
||||
const results =
|
||||
screenable.length > 0
|
||||
|
||||
Reference in New Issue
Block a user