From 237b0825f3c44da2f7562adecd1d06e4a0cea1b3 Mon Sep 17 00:00:00 2001 From: Brett Sun Date: Fri, 10 Feb 2017 12:12:13 +0100 Subject: [PATCH] Remove settings and configuration for BDB_NODE_API_PATH as the driver does this for us now --- .env_template | 1 - web/utils.py | 13 +++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.env_template b/.env_template index 8b79ff5..9ba8800 100644 --- a/.env_template +++ b/.env_template @@ -8,7 +8,6 @@ API_PORT=3000 # Settings for the BigchainDB node that the API server should connect to BDB_NODE_HOST= BDB_NODE_PORT= -BDB_NODE_API_PATH= ##### Docker settings ##### # Externally exposed port for accessing BigchainDB's API diff --git a/web/utils.py b/web/utils.py index d71a41e..2a661a5 100644 --- a/web/utils.py +++ b/web/utils.py @@ -5,7 +5,6 @@ BigchainDBConfiguration = namedtuple('BigchainDBConfiguration', [ 'hostname', 'port', - 'api_path' ]) @@ -19,20 +18,14 @@ if not BDB_PORT: BDB_PORT = '9984' -BDB_API_PATH = os.environ.get('BDB_NODE_API_PATH', None) -if not BDB_API_PATH: - BDB_API_PATH = 'api/v1' - def get_bigchaindb_configuration(): - return BigchainDBConfiguration(BDB_HOST, BDB_PORT, BDB_API_PATH) + return BigchainDBConfiguration(BDB_HOST, BDB_PORT) def get_bigchaindb_api_url(): - hostname, port, api_path = get_bigchaindb_configuration() - return 'http://{hostname}:{port}/{api_path}'.format(hostname=hostname, - port=port, - api_path=api_path) + hostname, port = get_bigchaindb_configuration() + return 'http://{hostname}:{port}'.format(hostname=hostname, port=port) def parse_model(required_fields):