add game & game_players table and rename password value in user to password_hash

This commit is contained in:
2026-02-24 18:29:32 +01:00
parent 83119a2443
commit b1556515a1
2 changed files with 31 additions and 8 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ def login():
(username,)
).fetchone()
if row and check_password_hash(row["password"], password):
if row and check_password_hash(row["password_hash"], password):
user = User(id=row["id"], username=row["username"])
login_user(user)
@@ -54,7 +54,7 @@ def register():
hashed_password = generate_password_hash(password)
db.execute(
"INSERT INTO users (username, password) VALUES (?, ?)",
"INSERT INTO users (username, password_hash) VALUES (?, ?)",
(username, hashed_password)
)
db.commit()