diff --git a/README.md b/README_MANUAL_INSTALLATION.md similarity index 100% rename from README.md rename to README_MANUAL_INSTALLATION.md diff --git a/ereuse_devicehub/config.py b/ereuse_devicehub/config.py index f93c1b4b..5152bee5 100644 --- a/ereuse_devicehub/config.py +++ b/ereuse_devicehub/config.py @@ -105,3 +105,6 @@ class DevicehubConfig(Config): OAUTH2_JWT_ISS = config('OAUTH2_JWT_ISS', '') OAUTH2_JWT_KEY = config('OAUTH2_JWT_KEY', None) OAUTH2_JWT_ALG = config('OAUTH2_JWT_ALG', 'HS256') + + if API_DLT: + API_DLT = API_DLT.strip("/") diff --git a/ereuse_devicehub/modules/oidc/commands/insert_member_in_dlt.py b/ereuse_devicehub/modules/oidc/commands/insert_member_in_dlt.py index e1c464bb..c944625f 100644 --- a/ereuse_devicehub/modules/oidc/commands/insert_member_in_dlt.py +++ b/ereuse_devicehub/modules/oidc/commands/insert_member_in_dlt.py @@ -21,6 +21,9 @@ class InsertMember: print("Error: you need a entry var API_RESOLVER in .env") return + api = api.strip("/") + domain = domain.strip("/") + data = {"url": domain} url = api + '/registerURL' res = requests.post(url, json=data) diff --git a/ereuse_devicehub/modules/oidc/commands/sync_dlt.py b/ereuse_devicehub/modules/oidc/commands/sync_dlt.py index 585a1803..5c75cb71 100644 --- a/ereuse_devicehub/modules/oidc/commands/sync_dlt.py +++ b/ereuse_devicehub/modules/oidc/commands/sync_dlt.py @@ -19,6 +19,8 @@ class GetMembers: print("Error: you need a entry var API_RESOLVER in .env") return + api = api.strip("/") + url = api + '/getAll' res = requests.get(url) if res.status_code != 200: