fix context; decoupling decode_token algo

This commit is contained in:
2026-05-20 15:40:59 +08:00
parent b95cce592f
commit d2162f93e0
3 changed files with 19 additions and 4 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ def get_current_user_id(request: Request):
raise HTTPException(status_code=401, detail="Not authenticated")
try:
payload = decode_token(token, JWT_SECRET, algorithms=[JWT_ALGORITHM])
payload = decode_token(token)
return payload["sub"]
except:
raise HTTPException(status_code=401, detail="Invalid token")