fix play key times used on view page

Added early API listener enpionts
This commit is contained in:
Aaron Kimbre 2022-03-28 11:01:46 -05:00
parent faff08b160
commit b6905c9235
3 changed files with 31 additions and 2 deletions

View File

@ -154,6 +154,8 @@ def register_blueprints(app):
app.register_blueprint(luclient_blueprint, url_prefix='/luclient') app.register_blueprint(luclient_blueprint, url_prefix='/luclient')
from .reports import reports_blueprint from .reports import reports_blueprint
app.register_blueprint(reports_blueprint, url_prefix='/reports') 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): def register_logging(app):

27
app/api.py Normal file
View File

@ -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

View File

@ -28,11 +28,11 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col text-right"> <div class="col text-right">
Uses Left: Times Used:
</div> </div>
<br/> <br/>
<div class="col"> <div class="col">
{{ key.key_uses}} {{ key.times_used}}
</div> </div>
</div> </div>
<div class="row"> <div class="row">