From ce9ecc8c61c41ce8b8f7d096fc579a1ed2da88ca Mon Sep 17 00:00:00 2001 From: Stijn De Clercq Date: Mon, 6 Sep 2021 01:56:16 +0200 Subject: [PATCH] Fix typo in stats route --- backend/routes/stats/command_stats/command_stats_route.py | 5 +++-- backend/routes/stats/stats_route.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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