From d0b28a866cc78bde81574d2507bca0241af73d23 Mon Sep 17 00:00:00 2001 From: BrianWu Date: Thu, 25 Jul 2024 15:44:37 +0800 Subject: [PATCH] Fix sql error in collectFileStats --- src/tasks/telemetry-task.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tasks/telemetry-task.ts b/src/tasks/telemetry-task.ts index bddcd8f..f827d67 100644 --- a/src/tasks/telemetry-task.ts +++ b/src/tasks/telemetry-task.ts @@ -154,8 +154,8 @@ async function collectFileStats(database): Promise { const { totalCount } = await database.get( `select count(*) as totalCount from file_record`, ); - const countByStatusResults = await database.get( - `select status, count(1) from file_record group by status`, + const countByStatusResults = await database.all( + `select status, count(1) as count from file_record group by status`, ); const fileStats = {