Fix can add players without friend code
Some checks are pending
Tests and checks on push / run-checks-and-tests (push) Waiting to run
Updates translation progress / update-translation-progress-issue (push) Waiting to run

This commit is contained in:
Kalle 2025-07-06 07:36:14 +03:00
parent 0eedac25cd
commit d32ff56da8

View File

@ -261,8 +261,8 @@ export const action: ActionFunction = async ({ request, params }) => {
"No trust given from this user",
);
errorToastIfFalsy(
(await UserRepository.findLeanById(user.id))?.friendCode,
"No friend code",
(await UserRepository.findLeanById(data.userId))?.friendCode,
"User you are trying to add has no friend code set",
);
errorToastIfFalsy(tournament.registrationOpen, "Registration is closed");