diff --git a/app/main/views/register.py b/app/main/views/register.py index c2856c1e6..7b4100cd8 100644 --- a/app/main/views/register.py +++ b/app/main/views/register.py @@ -37,7 +37,7 @@ def register(): role_id=1) users_dao.insert_user(user) - user_api_client = UserApiClient(current_app.config['NOTIFY_API_URL'], + user_api_client = UserApiClient(current_app.config['API_HOST_NAME'], current_app.config['ADMIN_CLIENT_USER_NAME'], current_app.config['ADMIN_CLIENT_SECRET']) try: diff --git a/app/notify_client/api_client.py b/app/notify_client/api_client.py index 50217721b..c3f91175a 100644 --- a/app/notify_client/api_client.py +++ b/app/notify_client/api_client.py @@ -12,7 +12,7 @@ class NotificationsAdminAPIClient(NotificationsAPIClient): "secret") def init_app(self, application): - self.base_url = application.config['NOTIFY_API_URL'] + self.base_url = application.config['API_HOST_NAME'] self.client_id = application.config['NOTIFY_API_CLIENT'] self.secret = application.config['NOTIFY_API_SECRET'] diff --git a/config.py b/config.py index 6d3fcd2d9..eb417cd7e 100644 --- a/config.py +++ b/config.py @@ -22,7 +22,7 @@ class Config(object): SESSION_COOKIE_HTTPONLY = True SESSION_COOKIE_SECURE = True - NOTIFY_API_URL = os.getenv('NOTIFY_API_URL') + API_HOST_NAME = os.getenv('API_HOST_NAME') NOTIFY_API_SECRET = os.getenv('NOTIFY_API_SECRET', "dev-secret") NOTIFY_API_CLIENT = os.getenv('NOTIFY_API_CLIENT', "admin") @@ -41,7 +41,7 @@ class Config(object): class Development(Config): DEBUG = True - NOTIFY_API_URL = 'http://localhost:6011' + API_HOST_NAME = 'http://localhost:6011' ADMIN_CLIENT_USER_NAME = 'dev-notify-admin' ADMIN_CLIENT_SECRET = 'dev-notify-secret-key'