Fixing wrong variable names
This commit is contained in:
parent
7f813806d3
commit
c1fdd50a2a
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user