From 9e35fa4d7d6f07addf01096f340442c5767835af Mon Sep 17 00:00:00 2001 From: "MH.Dmitrii" Date: Sun, 19 Apr 2026 21:06:46 +0300 Subject: [PATCH] fix current user endpoint --- server/backend/endpoints/endpoints.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/backend/endpoints/endpoints.py b/server/backend/endpoints/endpoints.py index 02f22d3..24bc108 100644 --- a/server/backend/endpoints/endpoints.py +++ b/server/backend/endpoints/endpoints.py @@ -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)