Compare commits

..

No commits in common. "7093733a6999bd11ae3aa9b556acb70c603e4fd6" and "9b8d9dac2ccb6cb1d3471736cdca7ac03d6dffe0" have entirely different histories.

2 changed files with 5 additions and 5 deletions

View file

@ -51,9 +51,9 @@ def verify():
if auth.check(pc_number, password) == 0: if auth.check(pc_number, password) == 0:
auth.delete(pc_number) auth.delete(pc_number)
return jsonify({'message': 'ok'}), 200 return render_template("verify.html"), jsonify({'message': 'ok'}), 200
else: else:
return jsonify({'message': 'damedesu'}), 401 return render_template("verify.html"), jsonify({'message': 'damedesu'}), 401
if __name__ == '__main__': if __name__ == '__main__':
app.run(host="0.0.0.0", port=5000, debug=True) app.run(host="0.0.0.0", port=5000, debug=True)

View file

@ -97,8 +97,8 @@ class Lock(customtkinter.CTkToplevel):
def auth(self): def auth(self):
auth_url = client_config["auth_host_url"] + "/verify" auth_url = client_config["auth_host_url"] + "/verify"
auth_json = { auth_json = {
"pc_number": int(client_config["pc_number"]), "pc_number": client_config["pc_number"],
"password": self.hash_genarate(str(self.password_entry.get())) "password": self.hash_genarate(self.password_entry.get())
} }
responce = requests.post(auth_url, json=auth_json) responce = requests.post(auth_url, json=auth_json)
if responce.status_code == 200: if responce.status_code == 200:
@ -121,7 +121,7 @@ if not os.path.isfile(client_config_path):
os.mkdir(config_dir_path) os.mkdir(config_dir_path)
client_config = { client_config = {
"auth_host_url": "http://localhost", "auth_host_url": "localhost",
"pc_number": "" "pc_number": ""
} }
with open(client_config_path, "w") as w: with open(client_config_path, "w") as w: