autocommit 22-07-2024-15-38

This commit is contained in:
Jason Q 2024-07-22 15:38:57 +10:00
parent 3ff6c55fad
commit f05da08ac8
2 changed files with 1 additions and 3 deletions

View File

@ -61,7 +61,7 @@ async def get_current_user(token: str = Depends(oauth2_scheme)):
)
try:
payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])
username: str = payload.get("sub")
username = payload.get("sub")
if username is None:
raise credentials_exception
token_data = TokenData(username=username)

View File

@ -2,8 +2,6 @@ from fastapi import FastAPI
from .routers import items, orders, users
app = FastAPI()
# Initialize database
# init_db()
# Include routers
app.include_router(items.router)