From f675e5ce953cc643186e917631a416cbf4b2c8c5 Mon Sep 17 00:00:00 2001 From: Miyamizu-MitsuhaSang <2510681107@qq.com> Date: Sat, 30 Aug 2025 16:12:45 +0800 Subject: [PATCH] =?UTF-8?q?api.user.py:=20=E6=9B=B4=E6=96=B0logout?= =?UTF-8?q?=E5=AE=89=E5=85=A8ttl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/users.py b/app/api/users.py index 482f7ef..930605d 100644 --- a/app/api/users.py +++ b/app/api/users.py @@ -99,7 +99,7 @@ async def user_logout(request: Request, exp = payload.get("exp") now = datetime.now(timezone.utc).timestamp() - ttl = int(exp - now) if exp else 7200 + ttl = max(int(exp - now), 1) if exp else 7200 # try: # payload = jwt.decode(raw_token, SECRET_KEY, algorithms=["HS256"])