Fix missing header

This commit is contained in:
Christian Cueni 2021-07-13 16:38:07 +02:00
parent b33f23b4c9
commit 62a23fac4f
2 changed files with 6 additions and 4 deletions

View File

@ -32,7 +32,7 @@
<p>Haben Sie noch kein hep Konto?</p>
<a
class="hep-link"
href="https://cms.hep-verlag.ch/register"
href="/api/oauth/login/"
data-cy="oauth-login">Jetzt registrieren</a>
</div>
</div>

View File

@ -31,12 +31,14 @@ class HepClient:
def _call(self, url, token_dict, method='get', data=None):
headers = {"accept": "application/json"}
if method == 'post':
response = oauth.hep.post(url, json=data, token=token_dict)
response = oauth.hep.post(url, json=data, token=token_dict, headers=headers)
elif method == 'get':
response = oauth.hep.get(url, params=data, token=token_dict)
response = oauth.hep.get(url, params=data, token=token_dict, headers=headers)
elif method == 'put':
response = oauth.hep.put(url, data=data, token=token_dict)
response = oauth.hep.put(url, data=data, token=token_dict, headers=headers)
return self._handle_response(response)