Spaces:
Sleeping
Sleeping
change annotated
Browse files
main.py
CHANGED
|
@@ -11,7 +11,7 @@ import shutil
|
|
| 11 |
from pathlib import Path
|
| 12 |
from contextlib import asynccontextmanager
|
| 13 |
import pandas as pd
|
| 14 |
-
from typing import Annotated
|
| 15 |
from datetime import datetime, timedelta, timezone
|
| 16 |
import jwt
|
| 17 |
from jwt.exceptions import InvalidTokenError
|
|
@@ -66,13 +66,13 @@ class Token(BaseModel):
|
|
| 66 |
token_type: str
|
| 67 |
|
| 68 |
class TokenData(BaseModel):
|
| 69 |
-
username: str
|
| 70 |
|
| 71 |
class User(BaseModel):
|
| 72 |
username: str
|
| 73 |
-
email: str
|
| 74 |
-
full_name: str
|
| 75 |
-
disabled: bool
|
| 76 |
|
| 77 |
class UserInDB(User):
|
| 78 |
hashed_password: str
|
|
|
|
| 11 |
from pathlib import Path
|
| 12 |
from contextlib import asynccontextmanager
|
| 13 |
import pandas as pd
|
| 14 |
+
from typing import Annotated, Optional, Union
|
| 15 |
from datetime import datetime, timedelta, timezone
|
| 16 |
import jwt
|
| 17 |
from jwt.exceptions import InvalidTokenError
|
|
|
|
| 66 |
token_type: str
|
| 67 |
|
| 68 |
class TokenData(BaseModel):
|
| 69 |
+
username: Optional[str] = None
|
| 70 |
|
| 71 |
class User(BaseModel):
|
| 72 |
username: str
|
| 73 |
+
email: Optional[str] = None
|
| 74 |
+
full_name: Optional[str] = None
|
| 75 |
+
disabled: Optional[bool] = None
|
| 76 |
|
| 77 |
class UserInDB(User):
|
| 78 |
hashed_password: str
|