fix: remove /v1 prefix from agent API endpoints and resolve variable naming conflicts
- Update all agent command endpoints to remove /v1 prefix for API consistency - Rename `success` variable to `is_success` in chain.py to avoid conflict with success() function - Rename `output` parameter to `output_file` in genesis.py for clarity - Add admin command help tests to verify command structure - Update blockchain status endpoint from /status to /v1/health in tests - Mark admin help command as working
This commit is contained in:
@@ -215,9 +215,9 @@ def delete(ctx, chain_id, force, confirm):
|
||||
raise click.Abort()
|
||||
|
||||
# Delete chain
|
||||
success = chain_manager.delete_chain(chain_id, force)
|
||||
is_success = chain_manager.delete_chain(chain_id, force)
|
||||
|
||||
if success:
|
||||
if is_success:
|
||||
success(f"Chain {chain_id} deleted successfully!")
|
||||
else:
|
||||
error(f"Failed to delete chain {chain_id}")
|
||||
@@ -240,9 +240,9 @@ def add(ctx, chain_id, node_id):
|
||||
config = load_multichain_config()
|
||||
chain_manager = ChainManager(config)
|
||||
|
||||
success = chain_manager.add_chain_to_node(chain_id, node_id)
|
||||
is_success = chain_manager.add_chain_to_node(chain_id, node_id)
|
||||
|
||||
if success:
|
||||
if is_success:
|
||||
success(f"Chain {chain_id} added to node {node_id} successfully!")
|
||||
else:
|
||||
error(f"Failed to add chain {chain_id} to node {node_id}")
|
||||
@@ -263,9 +263,9 @@ def remove(ctx, chain_id, node_id, migrate):
|
||||
config = load_multichain_config()
|
||||
chain_manager = ChainManager(config)
|
||||
|
||||
success = chain_manager.remove_chain_from_node(chain_id, node_id, migrate)
|
||||
is_success = chain_manager.remove_chain_from_node(chain_id, node_id, migrate)
|
||||
|
||||
if success:
|
||||
if is_success:
|
||||
success(f"Chain {chain_id} removed from node {node_id} successfully!")
|
||||
else:
|
||||
error(f"Failed to remove chain {chain_id} from node {node_id}")
|
||||
|
||||
Reference in New Issue
Block a user