release 2.0

This commit is contained in:
2025-12-23 03:09:27 +03:00
parent 16c2622d13
commit f99fd8118c
9 changed files with 115 additions and 47 deletions
+5 -6
View File
@@ -324,7 +324,7 @@ def api_birthdate():
match request.method:
case "POST":
reqData = request.json
userUpdate = reqData["userUpdate"]
userUpdate = reqData.get("userUpdate", None)
if userUpdate:
logger.info("Обновлен пользователь")
userId = userUpdate["userId"]
@@ -338,7 +338,7 @@ def api_birthdate():
except Exception as e:
logger.error(f"Ошибка при обновлении пользователя: {e}")
return jsonify({"status": "error"}), 500
scheduleSettings = reqData["scheduleSettings"]
scheduleSettings = reqData.get("scheduleSettings")
if scheduleSettings:
logger.info("Обновлены настройки расписания")
try:
@@ -554,13 +554,13 @@ def login():
protection = Protection.query.first()
if not protection:
protection = Protection()
protection.set_password(password)
protection.set_password(new_password)
protection.generate_token()
db.session.add(protection)
db.session.commit()
else:
protection.set_password(password)
protection.set_password(new_password)
db.session.commit()
return {"status": "ok"}
@@ -595,5 +595,4 @@ def check_auth_cookie():
if __name__ == "__main__":
init_app()
app.run(debug=True, host="0.0.0.0", port=80)
# app.run(host="0.0.0.0", port=80)
app.run(host="0.0.0.0", port=80)