Fixing wrong usage of getserver
This commit is contained in:
parent
3a19ba5fa7
commit
7f813806d3
@ -13,7 +13,7 @@ class Auth(BaseAuth):
|
||||
if user is None:
|
||||
return False
|
||||
|
||||
res1 = requests.post(self.get_server + "/api/login?uid=" + user)
|
||||
res1 = requests.post(self.get_server() + "/api/login?uid=" + user)
|
||||
data1 = res1.json()
|
||||
|
||||
if "error" in data:
|
||||
@ -24,7 +24,7 @@ class Auth(BaseAuth):
|
||||
id = self.configuration.get("auth", "client_id")
|
||||
secret = self.configuration.get("auth", "client_secret")
|
||||
password = hashlib.sha512(salt + password.encode()).hexdigest()
|
||||
res2 = requests.post("/api/internel/password", params={
|
||||
res2 = requests.post(self.get_server() + "/api/internel/password", params={
|
||||
"client_id": id, "client_secret": secret}, json={"uid": user, "password": password})
|
||||
data2 = res2.json()
|
||||
|
||||
@ -37,7 +37,7 @@ class Auth(BaseAuth):
|
||||
if login is None or login is "":
|
||||
return None
|
||||
req_data = dict()
|
||||
res = requests.post(self.get_server + "/api/login?username=" + login)
|
||||
res = requests.post(self.get_server() + "/api/login?username=" + login)
|
||||
data = res.json()
|
||||
if "error" in data:
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user