guhongwei 3 년 전
부모
커밋
4cc572ca74
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/service/team.js

+ 1 - 1
app/service/team.js

@@ -20,7 +20,7 @@ class TeamService extends CrudService {
   }
   // 用户所在团队列表
   async userteams({ user_id } = {}) {
-    const res = await this.model.find({ members: { $elemMatch: { id: user_id } } });
+    const res = await this.model.find({ members: { $elemMatch: { user_id: user_id } } });
     if (!res) throw new BusinessError(ErrorCode.DATA_NOT_EXIST);
     return res;
   }