restrucuted blueprint layouts and added more skeleton api routes to be used from the frontend
This commit is contained in:
@@ -24,9 +24,13 @@ def create_app():
|
||||
from blueprints.authentication import auth_bp
|
||||
from blueprints.main import main_bp
|
||||
from blueprints.stripe import stripe_bp
|
||||
from blueprints.user import user_bp
|
||||
from blueprints.streams import stream_bp
|
||||
|
||||
app.register_blueprint(auth_bp)
|
||||
app.register_blueprint(main_bp)
|
||||
app.register_blueprint(stripe_bp)
|
||||
app.register_blueprint(user_bp)
|
||||
app.register_blueprint(stream_bp)
|
||||
|
||||
return app
|
||||
@@ -10,20 +10,6 @@ def hls(stream_id):
|
||||
#--------------------------------------------------------
|
||||
|
||||
|
||||
@main_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}
|
||||
|
||||
@main_bp.route('/authenticate_user')
|
||||
def authenticate_user():
|
||||
"""
|
||||
Authenticates the user
|
||||
"""
|
||||
return {"authenticated": True}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user