fix current user endpoint
All checks were successful
Build Docker / deploy (push) Successful in 39s
Build Docker / build (push) Successful in 1m8s

This commit is contained in:
2026-04-19 21:06:46 +03:00
parent d206d9421a
commit 9e35fa4d7d

View File

@@ -8,9 +8,9 @@ security = HTTPBearer(auto_error=False)
async def get_current_user(
credentials: HTTPAuthorizationCredentials = Depends(security),
token_cookie: str = Cookie(default=None)
token: str = Cookie(default=None)
):
token = credentials.credentials if credentials else token_cookie
token = credentials.credentials if credentials else token
if not token:
raise HTTPException(status_code=401, detail="Not authenticated")
user = decodeJWT(token)