Tournament: Allow admin to add members to team after full

This commit is contained in:
Kalle
2023-05-30 22:07:05 +03:00
parent 87d4982202
commit 6903e62b59

View File

@@ -115,10 +115,6 @@ export const action: ActionFunction = async ({ request, params }) => {
case "ADD_MEMBER": {
const team = teams.find((t) => t.id === data.teamId);
validate(team, "Invalid team id");
validate(
team.members.length < TOURNAMENT.TEAM_MAX_MEMBERS,
"Team is full"
);
validate(
!teams.some((t) =>
t.members.some((m) => m.userId === data["user[value]"])