mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-30 20:56:39 +00:00
fix: recursion now really
This commit is contained in:
parent
eac4a2c16d
commit
a2643566b6
|
@ -128,7 +128,7 @@ class KanidmAdminToken:
|
||||||
response = requests.get(
|
response = requests.get(
|
||||||
"{KANIDM_URL}/v1/person/root",
|
"{KANIDM_URL}/v1/person/root",
|
||||||
headers={
|
headers={
|
||||||
"Authorization": f"Bearer {KanidmAdminToken.get()}",
|
"Authorization": f"Bearer {token}",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
timeout=1,
|
timeout=1,
|
||||||
|
@ -222,14 +222,13 @@ class KanidmUserRepository(AbstractUserRepository):
|
||||||
raise ValueError(f"Unsupported HTTP method: {method}")
|
raise ValueError(f"Unsupported HTTP method: {method}")
|
||||||
|
|
||||||
full_endpoint = f"{KANIDM_URL}/v1/{endpoint}"
|
full_endpoint = f"{KANIDM_URL}/v1/{endpoint}"
|
||||||
kanidm_token = KanidmAdminToken.get()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
response = request_method(
|
response = request_method(
|
||||||
full_endpoint,
|
full_endpoint,
|
||||||
json=data,
|
json=data,
|
||||||
headers={
|
headers={
|
||||||
"Authorization": f"Bearer {kanidm_token}",
|
"Authorization": f"Bearer {KanidmAdminToken.get()}",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
timeout=1,
|
timeout=1,
|
||||||
|
|
Loading…
Reference in a new issue