fix strip slash in domain
This commit is contained in:
parent
dce2873158
commit
843324bd17
|
@ -105,3 +105,6 @@ class DevicehubConfig(Config):
|
||||||
OAUTH2_JWT_ISS = config('OAUTH2_JWT_ISS', '')
|
OAUTH2_JWT_ISS = config('OAUTH2_JWT_ISS', '')
|
||||||
OAUTH2_JWT_KEY = config('OAUTH2_JWT_KEY', None)
|
OAUTH2_JWT_KEY = config('OAUTH2_JWT_KEY', None)
|
||||||
OAUTH2_JWT_ALG = config('OAUTH2_JWT_ALG', 'HS256')
|
OAUTH2_JWT_ALG = config('OAUTH2_JWT_ALG', 'HS256')
|
||||||
|
|
||||||
|
if API_DLT:
|
||||||
|
API_DLT = API_DLT.strip("/")
|
||||||
|
|
|
@ -21,6 +21,9 @@ class InsertMember:
|
||||||
print("Error: you need a entry var API_RESOLVER in .env")
|
print("Error: you need a entry var API_RESOLVER in .env")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
api = api.strip("/")
|
||||||
|
domain = domain.strip("/")
|
||||||
|
|
||||||
data = {"url": domain}
|
data = {"url": domain}
|
||||||
url = api + '/registerURL'
|
url = api + '/registerURL'
|
||||||
res = requests.post(url, json=data)
|
res = requests.post(url, json=data)
|
||||||
|
|
|
@ -19,6 +19,8 @@ class GetMembers:
|
||||||
print("Error: you need a entry var API_RESOLVER in .env")
|
print("Error: you need a entry var API_RESOLVER in .env")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
api = api.strip("/")
|
||||||
|
|
||||||
url = api + '/getAll'
|
url = api + '/getAll'
|
||||||
res = requests.get(url)
|
res = requests.get(url)
|
||||||
if res.status_code != 200:
|
if res.status_code != 200:
|
||||||
|
|
Reference in New Issue