From 4b1fc747e41d7282a237885f746fb5647c9dc322 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 12 Jun 2023 01:23:53 -0700 Subject: [PATCH] refactor: :coffin: remove old db calls, add todo --- .../backend/src/server/api/endpoints/stats.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/stats.ts b/packages/backend/src/server/api/endpoints/stats.ts index f4e269be4a..97889c42ed 100644 --- a/packages/backend/src/server/api/endpoints/stats.ts +++ b/packages/backend/src/server/api/endpoints/stats.ts @@ -60,24 +60,6 @@ export const paramDef = { } as const; export default define(meta, paramDef, async () => { - // const [ - // notesCount, - // originalNotesCount, - // usersCount, - // originalUsersCount, - // reactionsCount, - // //originalReactionsCount, - // instances, - // ] = await Promise.all([ - // Notes.count({ cache: 3600000 }), // 1 hour - // Notes.count({ where: { userHost: IsNull() }, cache: 3600000 }), - // Users.count({ cache: 3600000 }), - // Users.count({ where: { host: IsNull() }, cache: 3600000 }), - // NoteReactions.count({ cache: 3600000 }), // 1 hour - // //NoteReactions.count({ where: { userHost: IsNull() }, cache: 3600000 }), - // Instances.count({ cache: 3600000 }), - // ]); - const notesChartData = await notesChart.getChart("hour", 1, null); const notesCount = notesChartData.local.total[0] + notesChartData.remote.total[0]; @@ -88,6 +70,7 @@ export default define(meta, paramDef, async () => { usersChartData.local.total[0] + usersChartData.remote.total[0]; const originalUsersCount = usersChartData.local.total[0]; const driveChartData = await driveChart.getChart("hour", 1, null); + //TODO: fixme currently returns 0 const driveUsageLocal = driveChartData.local.incSize[0]; const driveUsageRemote = driveChartData.remote.incSize[0];