PATCH: Fixed incorrect SQL query

This commit is contained in:
2025-03-02 21:41:35 +00:00
parent 05ea4cd573
commit 11c2d67a43
2 changed files with 5 additions and 5 deletions

View File

@@ -220,8 +220,6 @@ def init_stream():
"""
stream_key = request.form.get("name")
print(f"Stream initialization requested in nginx with key: {stream_key}", flush=True)
with Database() as db:
# Check if valid stream key and user is allowed to stream
user_info = db.fetchone("""SELECT user_id, username, is_live
@@ -238,6 +236,8 @@ def init_stream():
# FOR TESTING
path_manager.create_user(username)
print(f"Stream initialization requested in nginx with key: {stream_key}", flush=True)
return redirect(username + "/" + path_manager.stream_directory_name)
@@ -366,9 +366,9 @@ def end_stream():
end thumbnail generation
"""
print("Ending stream", flush=True)
print("TEST END STREAM")
stream_key = request.get_json().get("key")
print(stream_key, flush=True)
user_id = None
username = None

View File

@@ -67,7 +67,7 @@ def get_custom_thumbnail_status(user_id: int) -> Optional[dict]:
with Database() as db:
custom_thumbnail = db.fetchone("""
SELECT custom_thumbnail
FROM users
FROM streams
WHERE user_id = ?;
""", (user_id,))
return custom_thumbnail