ソースを参照

change findAll to countList

Seiya Tashiro 7 年 前
コミット
7b77e1f717
1 ファイル変更1 行追加2 行削除
  1. 1 2
      src/server/routes/admin.js

+ 1 - 2
src/server/routes/admin.js

@@ -469,8 +469,7 @@ module.exports = function(crowi, app) {
 
   actions.user = {};
   actions.user.index = async function(req, res) {
-    const findAllUsers = await User.findAllUsers({status: User.statusActivate});
-    const activeUsers = findAllUsers.length;
+    const activeUsers = await User.countListByStatus(User.STATUS_ACTIVE);
     const Config = crowi.model('Config');
     const userUpperLimit = Config.userUpperLimit(crowi);
     const isUserCountExceedsUpperLimit = await User.isUserCountExceedsUpperLimit();