mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-06-05 07:29:56 +08:00
feat: Add the ability to get the latest version
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user