feat: add hourly portfolio sync history
This commit is contained in:
@@ -40,8 +40,8 @@ export class StockIncomeService {
|
||||
private readonly forecasts: ForecastService,
|
||||
) {}
|
||||
|
||||
async readPosition(userId: string, uid: string, observe = false) {
|
||||
const saved = await this.portfolios.read(userId, 'all', observe);
|
||||
async readPosition(userId: string, uid: string) {
|
||||
const saved = await this.portfolios.read(userId, 'all');
|
||||
return {
|
||||
data: saved.data ? instrumentPosition(saved.data, uid, 'STOCK') : null,
|
||||
meta: { ...saved.meta, resourceKey: `stock/position/${uid}` },
|
||||
@@ -57,7 +57,7 @@ export class StockIncomeService {
|
||||
const today = moscowDay(new Date().toISOString());
|
||||
const from = `${Number(today.slice(ISO_DATE_START, ISO_YEAR_LENGTH)) - INCOME_HISTORY_YEARS}${today.slice(ISO_YEAR_LENGTH)}`;
|
||||
const to = `${Number(today.slice(ISO_DATE_START, ISO_YEAR_LENGTH)) + INCOME_FORECAST_YEARS}${today.slice(ISO_YEAR_LENGTH)}`;
|
||||
const portfolio = await this.portfolios.read(userId, 'all', observe);
|
||||
const portfolio = await this.portfolios.read(userId, 'all');
|
||||
const sources = await this.sources.readMany(
|
||||
userId,
|
||||
'share',
|
||||
|
||||
Reference in New Issue
Block a user