update to use cachedRequest

This commit is contained in:
takuabonn committed 2023-12-14 00:47:11 +09:00
1 parent 89eb7ec90b
commit 7cb58ed988
3 files changed
+47 -5

No files matched your search

@@ -81,9 +81,9 @@ export class LightningStatisticsChartComponent implements OnInit {
firstRun = false;
this.miningWindowPreference = timespan;
this.isLoading = true;
return this.lightningApiService.listStatistics$(timespan)
return this.lightningApiService.cachedRequest(this.lightningApiService.listStatistics$, 250, timespan)
.pipe(
tap((response) => {
tap((response:any) => {
const data = response.body;
this.prepareChartOptions({
channel_count: data.map(val => [val.added * 1000, val.channel_count]),