public async Task <ActionResult> GetPlayer() { var user = await _steamService.GetSteamUser(); _logger.LogInformation($"Loading the steam user: {user.Personaname}"); return(View(user)); }
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)); }