public async Task <ActionResult> GetPlayer()
        {
            var user = await _steamService.GetSteamUser();

            _logger.LogInformation($"Loading the steam user: {user.Personaname}");

            return(View(user));
        }
Beispiel #2
0
        public async Task <IActionResult> Index(string steamId, string steamKey)
        {
            if (!string.IsNullOrEmpty(steamId) || !string.IsNullOrEmpty(steamKey))
            {
                SetEnvironmentVariables(steamId, steamKey);
            }

            PlayerDto steamUser = await _playerService.GetPlayer(steamId);

            if (steamUser == null)
            {
                steamUser = await _steamService.GetSteamUser();

                await _playerService.AddPlayer(steamUser);
            }

            _logger.LogInformation($"Steam user loading: {steamUser?.Personaname}");

            return(View(steamUser));
        }