Ejemplo n.º 1
0
        public async Task <IActionResult> MyInvites()
        {
            var currentUser = await _userManager.FindByNameAsync(User.Identity.Name);

            var invitedLeagues = await _fantasyCriticService.GetLeaguesInvitedTo(currentUser);

            var viewModels = invitedLeagues.Select(x => new InviteViewModel(x));

            return(Ok(viewModels));
        }