PATCH: removed commit_data method from database as it is no longer necessary

This commit is contained in:
white
2025-01-29 11:59:12 +00:00
parent e2070be9f9
commit f63dc4a368
5 changed files with 1 additions and 6 deletions

View File

@@ -93,7 +93,6 @@ def signup():
None
)
)
db.commit_data()
# Create session for new user, to avoid them having unnecessary state info
session.clear()

View File

@@ -107,5 +107,4 @@ def save_chat(chatter_id, stream_id, message):
db.execute("""
INSERT INTO chat (chatter_id, stream_id, message)
VALUES (?, ?, ?);""", (chatter_id, stream_id, message))
db.commit_data()
db.close_connection()

View File

@@ -180,7 +180,6 @@ def publish_stream():
1,
datetime.now(),
1))
db.commit_data()
return redirect(f"/{user_info['username']}")
@@ -198,6 +197,5 @@ def end_stream():
# Set stream to not live
db.execute("""UPDATE streams SET isLive = 0 WHERE user_id = ? AND isLive = 1""", (user_info["user_id"],))
db.commit_data()
return "Stream ended", 200

View File

@@ -130,7 +130,6 @@ def reset_password(new_password: str, email: str):
try:
db.execute("UPDATE users SET password = ? WHERE email = ?", (generate_password_hash(new_password), email))
db.commit_data()
return True
except Exception as e:
print(f"Error: {e}")