Skip to content

Commit

Permalink
feat(team): allow transfer when team locked
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Nov 26, 2024
1 parent 2003fec commit 1b9a994
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/GZCTF/Controllers/TeamController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,6 @@ public async Task<IActionResult> Transfer([FromRoute] int id, [FromBody] TeamTra
StatusCodes.Status403Forbidden))
{ StatusCode = StatusCodes.Status403Forbidden };

if (team.Locked && await teamRepository.AnyActiveGame(team, token))
return BadRequest(new RequestResponse(localizer[nameof(Resources.Program.Team_Locked)]));

UserInfo? newCaptain = await userManager.Users.SingleOrDefaultAsync(u => u.Id == model.NewCaptainId, token);

if (newCaptain is null)
Expand Down

0 comments on commit 1b9a994

Please sign in to comment.