From e4a9fd06b4849dfe1fd41b7efa2c886f7a809ad6 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Wed, 22 Dec 2021 23:01:32 +0900 Subject: [PATCH] Switch the 24h chart to 1 min data ticks --- backend/src/api/statistics.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/api/statistics.ts b/backend/src/api/statistics.ts index d1784f937..b10c216a5 100644 --- a/backend/src/api/statistics.ts +++ b/backend/src/api/statistics.ts @@ -394,7 +394,7 @@ class Statistics { public async $list24H(): Promise { try { const connection = await DB.pool.getConnection(); - const query = this.getQueryForDaysAvg(120, '1 DAY'); // 2m interval + const query = `SELECT *, UNIX_TIMESTAMP(added) as added FROM statistics ORDER BY id DESC LIMIT 1440`; const [rows] = await connection.query({ sql: query, timeout: this.queryTimeout }); connection.release(); return this.mapStatisticToOptimizedStatistic(rows);