Skip to content

Commit

Permalink
🎨 Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
BeaverNotACat committed Aug 17, 2024
1 parent 8d9bdd1 commit 3065930
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions backend/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
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=["*"])
app = Litestar(
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],
)
2 changes: 1 addition & 1 deletion backend/app/presentation/authentication/jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions backend/app/presentation/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -33,7 +33,7 @@ class CreateFormPopulations(Controller):
path = "/forms"
dependencies = {
"ioc": Provide(interactor_dependency),
"auth": Provide(user_dependency)
"auth": Provide(user_dependency),
}

@post()
Expand Down

0 comments on commit 3065930

Please sign in to comment.