public async Task <ActionResult <DsPlayerStats> > GetPlayerStats(string name) { try { var playerStats = await StatsService.GetPlayerStats(context, name); if (playerStats == null) { return(NotFound()); } else { return(playerStats); } } catch (Exception e) { logger.LogError($"failed getting player stats {name}: {e.Message}"); return(StatusCode(500)); } }
public async Task <DsPlayerStats> GetPlayerStats(List <string> playerNames) { return(await StatsService.GetPlayerStats(context, playerNames)); }