Ejemplo n.º 1
0
        public async Task <ActionResult <string> > GetShopModel([FromQuery] string playerId)
        {
            if (string.IsNullOrEmpty(playerId))
            {
                return(BadRequest());
            }

            ShopModel shopModel = null;

            try
            {
                shopModel = await shopService.GetShopModelAsync(playerId);
            }
            catch (Exception e)
            {
                Console.WriteLine("Брошено исключение " + e.Message + " " + e.StackTrace);
            }
            if (shopModel == null)
            {
                return(StatusCode(500));
            }

            return(shopModel.SerializeToBase64String());
        }