Example #1
0
        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));
            }
        }
Example #2
0
 public async Task <DsPlayerStats> GetPlayerStats(List <string> playerNames)
 {
     return(await StatsService.GetPlayerStats(context, playerNames));
 }