Fixing wrong variable names

This commit is contained in:
Fabian Stamm 2018-09-23 13:08:43 +02:00
parent 7f813806d3
commit c1fdd50a2a

View File

@ -16,10 +16,10 @@ class Auth(BaseAuth):
res1 = requests.post(self.get_server() + "/api/login?uid=" + user)
data1 = res1.json()
if "error" in data:
if "error" in data1:
return False
salt = data["salt"]
salt = data1["salt"]
id = self.configuration.get("auth", "client_id")
secret = self.configuration.get("auth", "client_secret")
@ -28,7 +28,7 @@ class Auth(BaseAuth):
"client_id": id, "client_secret": secret}, json={"uid": user, "password": password})
data2 = res2.json()
if "success" in data2 and data["success"] is True:
if "success" in data2 and data2["success"] is True:
return True
return False