guhongwei 2 năm trước cách đây
mục cha
commit
3a9eb44c7c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/service/team.js

+ 1 - 1
app/service/team.js

@@ -14,7 +14,7 @@ class TeamService extends CrudService {
   async leaves({ team_id, user_id } = {}) {
   async leaves({ team_id, user_id } = {}) {
     const res = await this.model.findById(team_id);
     const res = await this.model.findById(team_id);
     if (!res) throw new BusinessError(ErrorCode.DATA_NOT_EXIST);
     if (!res) throw new BusinessError(ErrorCode.DATA_NOT_EXIST);
-    const members = res.members.filter(i => i.id !== user_id);
+    const members = res.members.filter(i => i.user_id !== user_id);
     res.members = members;
     res.members = members;
     await res.save();
     await res.save();
   }
   }