public ActionResult Post(NodeModel model)
        {
            using (var db = new AppDatabase())
            {
                var node = db.GetNode(model.Address);

                if (node == null)
                {
                    var nodes = db.Nodes.Upsert(new Database.Entities.Node
                    {
                        Address = model.Address,
                        Name    = model.Name,
                        Url     = model.Url
                    });
                    db.Nodes.EnsureIndex(n => n.Address, unique: true);
                }
                else
                {
                    node.Name = model.Name;
                    db.Nodes.Update(node);
                }

                return(Ok());
            }
        }
        public ActionResult Post(NodeStateModel model)
        {
            using (var db = new AppDatabase())
            {
                var node = db.GetNode(model.Address);

                if (node == null)
                {
                    return(BadRequest("Node not found"));
                }


                node.Balance = model.Balance;
                db.Nodes.Update(node);

                return(Ok());
            }
        }