Explorar el Código

change findAll to countList

Seiya Tashiro hace 7 años
padre
commit
7b77e1f717
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  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();