From 8822e6fa50491953e6db285141a423c7aa21ff3b Mon Sep 17 00:00:00 2001 From: Kengwang Date: Fri, 15 Mar 2024 20:36:30 +0800 Subject: [PATCH] fix: remove user participation when leaving team (#250) --- src/GZCTF/Controllers/TeamController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GZCTF/Controllers/TeamController.cs b/src/GZCTF/Controllers/TeamController.cs index 011fe15c8..c45dd98d7 100644 --- a/src/GZCTF/Controllers/TeamController.cs +++ b/src/GZCTF/Controllers/TeamController.cs @@ -447,6 +447,7 @@ public async Task 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);