mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-19 00:57:55 -05:00
Backend check that can't register as sub if already in a team
This commit is contained in:
parent
c2ed3ad985
commit
ba05ae0ed6
|
|
@ -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(","),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user