This commit is contained in:
white
2025-03-05 13:33:51 +00:00
2 changed files with 3 additions and 2 deletions

View File

@@ -87,7 +87,7 @@ def stream_data(username=None, streamer_id=None) -> dict:
else:
data = {"stream_key": stream_key["stream_key"]}
return jsonify([data])
return jsonify(data)
# Category Routes
@@ -321,6 +321,7 @@ def update_stream():
# TODO: Add thumbnails (paths) to table, allow user to update thumbnail
print("Updating stream info", flush=True)
print(request.is_json, flush=True)
data = request.get_json()
stream_key = data.get("key")

View File

@@ -24,7 +24,7 @@ def user_preferences():
# Retrieves category associated with stream
current_category = db.fetchone("""SELECT category_id FROM streams
WHERE user_id = ?
""", (stream_id))
""", (stream_id,))
# If stream is still live then update the user_preferences table to reflect their preferences
if current_category:
db.execute("""INSERT INTO user_preferences (user_id,category_id,favourability)