Merge branch 'main' of https://github.com/john-david3/cs3305-team11
This commit is contained in:
@@ -87,7 +87,7 @@ def stream_data(username=None, streamer_id=None) -> dict:
|
|||||||
else:
|
else:
|
||||||
data = {"stream_key": stream_key["stream_key"]}
|
data = {"stream_key": stream_key["stream_key"]}
|
||||||
|
|
||||||
return jsonify([data])
|
return jsonify(data)
|
||||||
|
|
||||||
|
|
||||||
# Category Routes
|
# Category Routes
|
||||||
@@ -321,6 +321,7 @@ def update_stream():
|
|||||||
# TODO: Add thumbnails (paths) to table, allow user to update thumbnail
|
# TODO: Add thumbnails (paths) to table, allow user to update thumbnail
|
||||||
|
|
||||||
print("Updating stream info", flush=True)
|
print("Updating stream info", flush=True)
|
||||||
|
print(request.is_json, flush=True)
|
||||||
|
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
stream_key = data.get("key")
|
stream_key = data.get("key")
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ def user_preferences():
|
|||||||
# Retrieves category associated with stream
|
# Retrieves category associated with stream
|
||||||
current_category = db.fetchone("""SELECT category_id FROM streams
|
current_category = db.fetchone("""SELECT category_id FROM streams
|
||||||
WHERE user_id = ?
|
WHERE user_id = ?
|
||||||
""", (stream_id))
|
""", (stream_id,))
|
||||||
# If stream is still live then update the user_preferences table to reflect their preferences
|
# If stream is still live then update the user_preferences table to reflect their preferences
|
||||||
if current_category:
|
if current_category:
|
||||||
db.execute("""INSERT INTO user_preferences (user_id,category_id,favourability)
|
db.execute("""INSERT INTO user_preferences (user_id,category_id,favourability)
|
||||||
|
|||||||
Reference in New Issue
Block a user