We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d503be commit 5ed4365Copy full SHA for 5ed4365
1 file changed
app/core/deps.py
@@ -2,7 +2,7 @@
2
Dependencies
3
"""
4
5
-from typing import Annotated, AsyncGenerator
+from typing import Annotated, Any, AsyncGenerator
6
7
from fastapi import Depends
8
from fastapi.security import APIKeyHeader
@@ -13,7 +13,7 @@
13
from app.models.user import User
14
15
16
-async def get_db() -> AsyncGenerator[Database]:
+async def get_db() -> AsyncGenerator[Database, Any]:
17
async with SessionLocal() as session:
18
yield Database(session)
19
@@ -30,7 +30,7 @@ async def get_logic(
30
31
32
async def get_current_user(
33
- token: Annotated[str, Depends(APIKeyHeader(name='access-token'))],
+ token: Annotated[str, Depends(APIKeyHeader(name="access-token"))],
34
logic: Annotated[Logic, Depends(get_logic)],
35
) -> User | None:
36
return await logic.users.retrieve_by_token(token)
0 commit comments