Restructure backend

This commit is contained in:
Stijn De Clercq 2021-09-06 01:33:59 +02:00
parent 16f8fedd16
commit 6ba104758b
16 changed files with 108 additions and 42 deletions

View file

@ -0,0 +1 @@
from .stats_route import stats_blueprint

View file

@ -0,0 +1 @@
from .command_stats_route import command_stats_blueprint

View file

@ -0,0 +1,8 @@
from quart import Blueprint
command_stats_blueprint: Blueprint = Blueprint("command_stats", __name__, "/commands")
@command_stats_blueprint.route("/", methods=["GET"])
def get_commands():
return {}, 200

View file

@ -0,0 +1,14 @@
from .command_stats import command_stats_blueprint
from quart import Blueprint
stats_blueprint: Blueprint = Blueprint("stats", __name__, url_prefix="/stats")
stats_blueprint.register_blueprint(command_stats_blueprint)
@stats_blueprint.route("/", methods=["GET"])
def get_nested_routes():
nested_routes = {
"commands": "/stats/commands"
}
return {"nested": nested_routes}, 200