Fix for token request
Now we simply request the token and not a dictionary with a key called token.
This commit is contained in:
@@ -65,7 +65,7 @@ class Api(object):
|
||||
for retrieving the token.
|
||||
"""
|
||||
if token:
|
||||
credentials = "{0}:0".format(token['token'])
|
||||
credentials = "{0}:0".format(token)
|
||||
else:
|
||||
credentials = "%s:%s" % (self.username, self.password)
|
||||
return base64.b64encode(credentials.encode('utf-8')).decode('utf-8').replace("\n", "")
|
||||
@@ -77,7 +77,6 @@ class Api(object):
|
||||
payload = {'username': self.username}
|
||||
|
||||
if self.token:
|
||||
print("no tokens")
|
||||
return self.token
|
||||
else:
|
||||
# If token is not set we do initial request with username and password
|
||||
|
||||
Reference in New Issue
Block a user