diff --git a/backend/app/app.py b/backend/app/app.py index d03ec97..976085b 100644 --- a/backend/app/app.py +++ b/backend/app/app.py @@ -2,7 +2,12 @@ from litestar.config.cors import CORSConfig from app.presentation.authentication.jwt import jwt_auth -from app.presentation.routes import ListFormPopulations, CreateFormPopulations, Login, Register +from app.presentation.routes import ( + CreateFormPopulations, + ListFormPopulations, + Login, + Register, +) from app.state import ioc_manager cors_config = CORSConfig(allow_origins=["*"]) @@ -10,10 +15,5 @@ cors_config=cors_config, lifespan=[ioc_manager], on_app_init=[jwt_auth.on_app_init], - route_handlers=[ - ListFormPopulations, - CreateFormPopulations, - Login, - Register - ], + route_handlers=[ListFormPopulations, CreateFormPopulations, Login, Register], ) diff --git a/backend/app/presentation/authentication/jwt.py b/backend/app/presentation/authentication/jwt.py index df77245..fa897bc 100644 --- a/backend/app/presentation/authentication/jwt.py +++ b/backend/app/presentation/authentication/jwt.py @@ -22,6 +22,6 @@ async def retrieve_user_provider( async def user_dependency( - request: Request[Authentication, Token, Any] + request: Request[Authentication, Token, Any], ) -> Authentication: return request.user diff --git a/backend/app/presentation/routes.py b/backend/app/presentation/routes.py index e8cd4a5..0b0c788 100644 --- a/backend/app/presentation/routes.py +++ b/backend/app/presentation/routes.py @@ -18,7 +18,7 @@ class ListFormPopulations(Controller): path = "/forms/{form_id: str}" dependencies = { "ioc": Provide(interactor_dependency), - "auth": Provide(user_dependency) + "auth": Provide(user_dependency), } @get() @@ -33,7 +33,7 @@ class CreateFormPopulations(Controller): path = "/forms" dependencies = { "ioc": Provide(interactor_dependency), - "auth": Provide(user_dependency) + "auth": Provide(user_dependency), } @post()