diff --git a/app/__init__.py b/app/__init__.py index 85dd958..4c3a915 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -154,6 +154,8 @@ def register_blueprints(app): app.register_blueprint(luclient_blueprint, url_prefix='/luclient') from .reports import reports_blueprint app.register_blueprint(reports_blueprint, url_prefix='/reports') + from .api import api_blueprint + app.register_blueprint(api_blueprint, url_prefix='/api') def register_logging(app): diff --git a/app/api.py b/app/api.py new file mode 100644 index 0000000..d1e8718 --- /dev/null +++ b/app/api.py @@ -0,0 +1,27 @@ +from flask import Blueprint, current_app, request + +api_blueprint = Blueprint('api', __name__) + + +@api_blueprint.route('/web', methods=['GET', 'POST']) +def web(): + current_app.logger.info(f"API::WEB [DATA] {request.data}") + return + + +@api_blueprint.route('/game', methods=['GET', 'POST']) +def game(): + current_app.logger.info(f"API::GAME [DATA] {request.data}") + return + + +@api_blueprint.route('/game_content', methods=['GET', 'POST']) +def game_content(): + current_app.logger.info(f"API::GAME CONTENT [DATA] {request.data}") + return + + +@api_blueprint.route('/metrics_data_service', methods=['GET', 'POST']) +def metrics_data_service(): + current_app.logger.info(f"API::METRICS DATA SERVICE [DATA] {request.data}") + return diff --git a/app/templates/play_keys/view.html.j2 b/app/templates/play_keys/view.html.j2 index 00332bc..ef735b6 100644 --- a/app/templates/play_keys/view.html.j2 +++ b/app/templates/play_keys/view.html.j2 @@ -28,11 +28,11 @@