Browse Source

Removed unnecessary method

Taichi Masuyama 4 years ago
parent
commit
9652555a01
1 changed files with 0 additions and 9 deletions
  1. 0 9
      packages/app/src/server/models/user-group-relation.js

+ 0 - 9
packages/app/src/server/models/user-group-relation.js

@@ -272,15 +272,6 @@ class UserGroupRelation {
       });
       });
   }
   }
 
 
-  static async findWithUserByGroupIds(groupIds) {
-    if (!Array.isArray(groupIds)) {
-      throw Error('groupIds must be an array');
-    }
-
-    return this.find({ relatedGroup: { $in: groupIds } })
-      .populate('relatedUser');
-  }
-
   static async findUserIdsByGroupId(groupId) {
   static async findUserIdsByGroupId(groupId) {
     const relations = await this.find({ relatedGroup: groupId }, { _id: 0, relatedUser: 1 }).lean().exec(); // .lean() to get not ObjectId but string
     const relations = await this.find({ relatedGroup: groupId }, { _id: 0, relatedUser: 1 }).lean().exec(); // .lean() to get not ObjectId but string