Fix TeamService deleting all team realtions by userId
This commit is contained in:
parent
c83fa2d6d4
commit
e76f762d23
@ -34,10 +34,10 @@ export class TeamService extends BaseService implements ITeamService {
|
||||
|
||||
async remove({id, userId}: {id: number, userId: number}) {
|
||||
await this.getRepository(UserTeam)
|
||||
.delete({userId})
|
||||
.delete({teamId: id, userId})
|
||||
|
||||
await this.getRepository(Team)
|
||||
.delete({id})
|
||||
.delete(id)
|
||||
|
||||
return {id}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user