From 5e0dbb3e52797cdea7a9069a9dd605c8f84034dd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Jun 2022 16:16:28 +0200 Subject: Fix users stats --- server/models/user/user.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/models/user') diff --git a/server/models/user/user.ts b/server/models/user/user.ts index 326b2e789..68b2bf523 100644 --- a/server/models/user/user.ts +++ b/server/models/user/user.ts @@ -819,10 +819,10 @@ export class UserModel extends Model>> { } } - return UserModel.count(query) + return UserModel.unscoped().count(query) } - const totalUsers = await UserModel.count() + const totalUsers = await UserModel.unscoped().count() const totalDailyActiveUsers = await getActiveUsers(1) const totalWeeklyActiveUsers = await getActiveUsers(7) const totalMonthlyActiveUsers = await getActiveUsers(30) -- cgit v1.2.3