Skip to content

Commit

Permalink
fix: remove user participation when leaving team (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
kengwang authored Mar 15, 2024
1 parent 08abdce commit 8822e6f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/GZCTF/Controllers/TeamController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ public async Task<IActionResult> Leave([FromRoute] int id, CancellationToken tok
return BadRequest(new RequestResponse(localizer[nameof(Resources.Program.Team_Locked)]));

team.Members.Remove(user!);
await participationRepository.RemoveUserParticipations(user!, team, token);

await teamRepository.SaveAsync(token);
await trans.CommitAsync(token);
Expand Down

0 comments on commit 8822e6f

Please sign in to comment.