Fix use of API token, without login
This commit is contained in:
parent
a586960ae6
commit
3110840017
@ -20,6 +20,9 @@ class HappyDomain:
|
||||
self.baseurl = scheme + "://" + host + ":" + str(port) + baseurl
|
||||
self.token = token
|
||||
|
||||
if self.token is not None:
|
||||
self.session.headers.update({'Authorization': 'Bearer ' + self.token})
|
||||
|
||||
def login(self, username, password):
|
||||
r = self.session.post(
|
||||
self.baseurl + "/api/auth",
|
||||
|
Loading…
x
Reference in New Issue
Block a user