import sys from flask import Blueprint from controllers import AuthController from di_container import Container from dependency_injector.wiring import inject, Provide auth_blueprint = Blueprint("auth", __name__) @auth_blueprint.route("/register", methods=["POST"]) @inject def register(auth_controller: AuthController = Provide[Container.auth_controller]): return auth_controller.register() @auth_blueprint.route("/login", methods=["POST"]) @inject def login(auth_controller: AuthController = Provide[Container.auth_controller]): return auth_controller.login() @auth_blueprint.route("/logout", methods=["DELETE"]) @inject def logout(auth_controller: AuthController = Provide[Container.auth_controller]): return auth_controller.logout()