From 3cc665f48fd233d09f778d7e887488dde6f03ef6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 7 May 2020 10:39:09 +0200 Subject: Add last login date to users --- server/controllers/api/server/stats.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'server/controllers') diff --git a/server/controllers/api/server/stats.ts b/server/controllers/api/server/stats.ts index f6a85d0c0..f07301a04 100644 --- a/server/controllers/api/server/stats.ts +++ b/server/controllers/api/server/stats.ts @@ -22,7 +22,7 @@ statsRouter.get('/stats', async function getStats (req: express.Request, res: express.Response) { const { totalLocalVideos, totalLocalVideoViews, totalVideos } = await VideoModel.getStats() const { totalLocalVideoComments, totalVideoComments } = await VideoCommentModel.getStats() - const { totalUsers } = await UserModel.getStats() + const { totalUsers, totalDailyActiveUsers, totalWeeklyActiveUsers, totalMonthlyActiveUsers } = await UserModel.getStats() const { totalInstanceFollowers, totalInstanceFollowing } = await ActorFollowModel.getStats() const { totalLocalVideoFilesSize } = await VideoFileModel.getStats() @@ -48,9 +48,15 @@ async function getStats (req: express.Request, res: express.Response) { totalLocalVideoComments, totalVideos, totalVideoComments, + totalUsers, + totalDailyActiveUsers, + totalWeeklyActiveUsers, + totalMonthlyActiveUsers, + totalInstanceFollowers, totalInstanceFollowing, + videosRedundancy: videosRedundancyStats } -- cgit v1.2.3