restrucuted blueprint layouts and added more skeleton api routes to be used from the frontend

This commit is contained in:
Oscar Cao
2025-01-23 23:49:08 +00:00
parent ced77e718a
commit be2248fcad
3 changed files with 29 additions and 14 deletions

View File

@@ -1,4 +1,5 @@
from flask import Blueprint
from database.database import Database
user_bp = Blueprint("stream", __name__)
@@ -7,6 +8,8 @@ def user_subscribed(user_id, streamer_id):
"""
Checks to see if user is subscribed to a streamer
"""
db = Database()
cursor = db.create_connection()
return
@user_bp.route('/is_following/<int:user_id>/<int:streamer_id>', methods=['GET'])
@@ -15,3 +18,25 @@ def user_following(user_id, streamer_id):
Checks to see if user is following a streamer
"""
return
@user_bp.route('/subscription_remaining/<int:user_id>/<int:streamer_id>', methods=['GET'])
def user_subscription_expiration(user_id, streamer_id):
"""
Returns remaining time until subscription expiration
"""
return
@user_bp.route('/get_login_status')
def get_login_status():
logged_in = False
"""
Returns whether the user is logged in or not
"""
return {"logged_in": logged_in}
@user_bp.route('/authenticate_user')
def authenticate_user():
"""
Authenticates the user
"""
return {"authenticated": True}