UPDATE: Attempting to add authentication to .ts route (WIP, not working)

This commit is contained in:
2025-03-03 21:42:24 +00:00
parent 43f3b54e22
commit fc4dcd3359
2 changed files with 21 additions and 11 deletions

View File

@@ -159,6 +159,25 @@ def user_live_status(username):
"user_id": user_id
})
@stream_bp.route('/user/<string:username>/direct_live_status')
def user_live_status_direct(username):
"""
Returns a streamer's status, if they are live or not
Returns:
{
"is_live": bool,
"user_id": int
}
"""
user_id = get_user_id(username)
is_live = True if get_streamer_live_status(user_id)['is_live'] else False
if is_live:
return 'ok', 200
else:
return 'not live', 404
# VOD Routes
@stream_bp.route('/vods/<int:vod_id>')