mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-26 05:51:29 +00:00
fix: change return type
This commit is contained in:
parent
997b88d4c8
commit
0f92452ee8
|
@ -31,15 +31,16 @@ class KanidmUserRepository(AbstractUserRepository):
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
timeout=0.8, # TODO: change timeout
|
timeout=0.8, # TODO: change timeout
|
||||||
verify=False,
|
verify=False, # TODO: REMOVE THIS NOTHALAL!!!!!
|
||||||
)
|
)
|
||||||
|
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
raise KanidmQueryError(
|
raise KanidmQueryError(
|
||||||
f"Kanidm returned {response.status_code} unexpected HTTP status code. Endpoint: {full_endpoint}. Error: {response.text}."
|
f"Kanidm returned {response.status_code} unexpected HTTP status code. Endpoint: {full_endpoint}. Error: {response.text}."
|
||||||
)
|
)
|
||||||
json = response.json()
|
# json = response.json()
|
||||||
return json["data"]
|
# return json["data"]
|
||||||
|
return response.json()
|
||||||
|
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
raise KanidmQueryError(f"Kanidm request failed! Error: {str(error)}")
|
raise KanidmQueryError(f"Kanidm request failed! Error: {str(error)}")
|
||||||
|
|
Loading…
Reference in a new issue