Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions backend/app/api/deps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from collections.abc import Generator
from typing import Annotated
from typing import Annotated, TypeAlias

import jwt
from fastapi import Depends, HTTPException, status
Expand All @@ -23,8 +23,8 @@ def get_db() -> Generator[Session, None, None]:
yield session


SessionDep = Annotated[Session, Depends(get_db)]
TokenDep = Annotated[str, Depends(reusable_oauth2)]
SessionDep: TypeAlias = Annotated[Session, Depends(get_db)]
TokenDep: TypeAlias = Annotated[str, Depends(reusable_oauth2)]


def get_current_user(session: SessionDep, token: TokenDep) -> User:
Expand All @@ -46,7 +46,7 @@ def get_current_user(session: SessionDep, token: TokenDep) -> User:
return user


CurrentUser = Annotated[User, Depends(get_current_user)]
CurrentUser: TypeAlias = Annotated[User, Depends(get_current_user)]


def get_current_active_superuser(current_user: CurrentUser) -> User:
Expand Down
Loading