diff --git a/backend/routes/stats/command_stats/command_stats_route.py b/backend/routes/stats/command_stats/command_stats_route.py index a2b5365..bd7ecde 100644 --- a/backend/routes/stats/command_stats/command_stats_route.py +++ b/backend/routes/stats/command_stats/command_stats_route.py @@ -1,8 +1,9 @@ +from functions.database.commands import query_command_stats from quart import Blueprint -command_stats_blueprint: Blueprint = Blueprint("command_stats", __name__, "/commands") +command_stats_blueprint: Blueprint = Blueprint("command_stats", __name__, url_prefix="/commands") @command_stats_blueprint.route("/", methods=["GET"]) def get_commands(): - return {}, 200 + return {"usage": query_command_stats()}, 200 diff --git a/backend/routes/stats/stats_route.py b/backend/routes/stats/stats_route.py index cb371ea..33f516b 100644 --- a/backend/routes/stats/stats_route.py +++ b/backend/routes/stats/stats_route.py @@ -9,6 +9,6 @@ stats_blueprint.register_blueprint(command_stats_blueprint) def get_nested_routes(): nested_routes = { "commands": "/stats/commands" - } + return {"nested": nested_routes}, 200