Пример #1
0
        public async Task <ActionResult> GetPlayerExtended(string gamertag)
        {
            // Call data store
            var player = await _store.GetPlayerDetailsExtendedAsync(gamertag);

            if (player == null)
            {
                return(NotFound());
            }

            // Return result
            return(Ok(PlayerExtendedGetResponseModel.FromPlayer(player)));
        }
Пример #2
0
        public async Task <ActionResult> GetCurrentPlayerExtended()
        {
            string userId = User.GetId();

            // Call data store
            var player = await _store.GetPlayerDetailsExtendedAsync(userId);

            if (player == null)
            {
                return(NotFound());
            }

            // Return result
            return(Ok(PlayerExtendedGetResponseModel.FromPlayer(player)));
        }