Skip to content

Commit

Permalink
fix(team create): only create one team (#330)
Browse files Browse the repository at this point in the history
Co-authored-by: GZTime <[email protected]>
  • Loading branch information
onlykood and GZTimeWalker committed Sep 12, 2024
1 parent 3dffb0b commit 81b1e13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GZCTF/Controllers/TeamController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public async Task<IActionResult> CreateTeam([FromBody] TeamUpdateModel model, Ca

Team[] teams = await teamRepository.GetUserTeams(user!, token);

if (teams.Length > 1 && teams.Any(t => t.CaptainId == user!.Id))
if (teams.Any(t => t.CaptainId == user!.Id))
return BadRequest(
new RequestResponse(localizer[nameof(Resources.Program.Team_MultipleCreationNotAllowed)]));

Expand Down

0 comments on commit 81b1e13

Please sign in to comment.