13 lines
307 B
Python
13 lines
307 B
Python
from flask import jsonify
|
|
|
|
from . import bp
|
|
from .generate_stats import generate_stats
|
|
from ..cache import flask_cache
|
|
from ...helpers import jsonify_pretty
|
|
|
|
|
|
@bp.route('/stats', methods=['GET'])
|
|
@flask_cache.cached(timeout=5, query_string=True)
|
|
def get_stats():
|
|
return jsonify_pretty(generate_stats())
|