diff --git a/py-kivy/pos_system/auth.py b/py-kivy/pos_system/auth.py index 95a4761..5d7811b 100644 --- a/py-kivy/pos_system/auth.py +++ b/py-kivy/pos_system/auth.py @@ -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) diff --git a/py-kivy/pos_system/server.py b/py-kivy/pos_system/server.py index eaab707..0409ef3 100644 --- a/py-kivy/pos_system/server.py +++ b/py-kivy/pos_system/server.py @@ -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)