guhongwei %!s(int64=3) %!d(string=hai) anos
pai
achega
3a9eb44c7c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 } = {}) {
     const res = await this.model.findById(team_id);
     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;
     await res.save();
   }