mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-27 05:38:09 -05:00
Backend check that can't register as sub if already in a team
This commit is contained in:
@@ -49,6 +49,10 @@ export const action: ActionFunction = async ({ params, request }) => {
|
||||
tournament.canAddNewSubPost,
|
||||
"Registration is closed or subs feature disabled",
|
||||
);
|
||||
validate(
|
||||
!tournament.teamMemberOfByUser(user),
|
||||
"Can't register as a sub and be in a team at the same time",
|
||||
);
|
||||
|
||||
upsertSub({
|
||||
bestWeapons: data.bestWeapons.join(","),
|
||||
|
||||
Reference in New Issue
Block a user