Пример #1
0
        public async Task <IActionResult> GetBlocksByCountry(string countryId)
        {
            try
            {
                if (string.IsNullOrEmpty(countryId))
                {
                    return(Json(new { IsSuccess = false, Message = "" }));
                }
                else
                {
                    var blocks = await _blockService.GetBlocksByCountryId(countryId);

                    return(Json(new { IsSuccess = true, Blocks = blocks }));
                }
            }
            catch (Exception e)
            {
                return(Json(new { IsSuccess = false, Message = e.Message }));
            }
        }