Пример #1
0
        public async Task <Result> AcceptInviteLink(LeagueInviteLink inviteLink, FantasyCriticUser inviteUser)
        {
            bool userInLeague = await UserIsInLeague(inviteLink.League, inviteUser);

            if (userInLeague)
            {
                return(Result.Failure("User is already in league."));
            }

            await _fantasyCriticRepo.AddPlayerToLeague(inviteLink.League, inviteUser);

            return(Result.Success());
        }