File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2
2
Dependencies
3
3
"""
4
4
5
- from typing import Annotated , AsyncGenerator
5
+ from typing import Annotated , Any , AsyncGenerator
6
6
7
7
from fastapi import Depends
8
8
from fastapi .security import APIKeyHeader
13
13
from app .models .user import User
14
14
15
15
16
- async def get_db () -> AsyncGenerator [Database ]:
16
+ async def get_db () -> AsyncGenerator [Database , Any ]:
17
17
async with SessionLocal () as session :
18
18
yield Database (session )
19
19
@@ -30,7 +30,7 @@ async def get_logic(
30
30
31
31
32
32
async def get_current_user (
33
- token : Annotated [str , Depends (APIKeyHeader (name = ' access-token' ))],
33
+ token : Annotated [str , Depends (APIKeyHeader (name = " access-token" ))],
34
34
logic : Annotated [Logic , Depends (get_logic )],
35
35
) -> User | None :
36
36
return await logic .users .retrieve_by_token (token )
You can’t perform that action at this time.
0 commit comments