public async Task Get()

in WhackAMole.KubeAdmin/Controllers/NodesController.cs [30:49]


        public async Task<IActionResult> Get()
        {
            try
            {
                var list = await _nodesRequest.GetAllAsync();

                if (list == null || list.Length == 0)
                    return new NotFoundObjectResult(null);

                var nodes = new List<Node>();
                foreach (var node in list)
                    nodes.Add(new Node { Name = node.MetaData.Name, Uid = node.MetaData.Uid });

                return new OkObjectResult(nodes);
            }
            catch (Exception)
            {
                return new NotFoundResult();
            }
        }