Ejemplo n.º 1
0
        public async Task <IActionResult> GetBlockById(string blockId)
        {
            try
            {
                if (string.IsNullOrEmpty(blockId))
                {
                    return(Json(new { IsSuccess = false, Message = "" }));
                }
                else
                {
                    var blockDetail = await _blockService.GetBlockById(blockId);

                    return(Json(new { IsSuccess = blockDetail is object, block = blockDetail }));
                }
            }
            catch (Exception e)
            {
                return(Json(new { IsSuccess = false, Message = e.Message }));
            }
        }