feat: Add the ability to get the latest version

This commit is contained in:
shiyu
2025-08-27 15:37:23 +08:00
parent 2f2e1db536
commit fd02a4bbe5
7 changed files with 159 additions and 29 deletions

View File

@@ -17,7 +17,7 @@ class LoggingMiddleware(BaseHTTPMiddleware):
try:
if token_str and token_str.startswith("Bearer "):
token = token_str.split(" ")[1]
payload = jwt.decode(token, ConfigCenter.get_secret_key("SECRET_KEY"), algorithms=[ALGORITHM])
payload = jwt.decode(token, await ConfigCenter.get_secret_key("SECRET_KEY"), algorithms=[ALGORITHM])
username = payload.get("sub")
if username:
user_account = await UserAccount.get_or_none(username=username)