|
|
|
@ -17,6 +17,7 @@ import {
|
|
|
|
|
ghostfolioFearAndGreedIndexDataSource
|
|
|
|
|
} from '@ghostfolio/common/config';
|
|
|
|
|
import {
|
|
|
|
|
DATE_FORMAT,
|
|
|
|
|
encodeDataSource,
|
|
|
|
|
extractNumberFromString
|
|
|
|
|
} from '@ghostfolio/common/helper';
|
|
|
|
@ -31,7 +32,7 @@ import { Injectable, Logger } from '@nestjs/common';
|
|
|
|
|
import { JwtService } from '@nestjs/jwt';
|
|
|
|
|
import * as bent from 'bent';
|
|
|
|
|
import * as cheerio from 'cheerio';
|
|
|
|
|
import { subDays } from 'date-fns';
|
|
|
|
|
import { format, subDays } from 'date-fns';
|
|
|
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
|
export class InfoService {
|
|
|
|
@ -346,7 +347,10 @@ export class InfoService {
|
|
|
|
|
)) as string;
|
|
|
|
|
|
|
|
|
|
const get = bent(
|
|
|
|
|
`https://betteruptime.com/api/v2/monitors/${monitorId}/sla`,
|
|
|
|
|
`https://betteruptime.com/api/v2/monitors/${monitorId}/sla?from=${format(
|
|
|
|
|
subDays(new Date(), 90),
|
|
|
|
|
DATE_FORMAT
|
|
|
|
|
)}&to${format(new Date(), DATE_FORMAT)}`,
|
|
|
|
|
'GET',
|
|
|
|
|
'json',
|
|
|
|
|
200,
|
|
|
|
|