fix login api

This commit is contained in:
jxxghp 2023-09-04 17:48:44 +08:00
parent 45b53da056
commit ce42e48b37
2 changed files with 6 additions and 0 deletions

View File

@ -56,6 +56,9 @@ async def login_access_token(
user.id, expires_delta=access_token_expires
),
token_type="bearer",
super_user=user.is_superuser,
user_name=user.name,
avatar=user.avatar
)

View File

@ -6,6 +6,9 @@ from pydantic import BaseModel
class Token(BaseModel):
access_token: str
token_type: str
super_user: bool
user_name: str
avatar: Optional[str] = None
class TokenPayload(BaseModel):