From 668ec148cf6152d884148fd7e8a6ad9160389adf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=93=9C=C2=B0?= Date: Mon, 16 Mar 2026 10:00:42 +0800 Subject: [PATCH] dev --- backend/api/core/Auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/api/core/Auth.py b/backend/api/core/Auth.py index 5f6b63b1..be994768 100644 --- a/backend/api/core/Auth.py +++ b/backend/api/core/Auth.py @@ -8,7 +8,7 @@ from api.core.exception import ResponseException class AlterState: - def __init__(self, alter: str, token: str, charcater: Character, equVersion: str,time: int): + def __init__(self, alter: str, token: str, charcater: Character, equVersion: str, time: int): if alter is None: raise ResponseException('无效的职业') self.alter = alter @@ -44,7 +44,7 @@ def createToken(value: str, equVersion: str, redis = None, expire=86400 / 24 * 2 token = base64.urlsafe_b64encode(token.encode('utf-8')).decode('utf-8') # character = createCharacter(alter) character = {} - redis.set(f'token:{token}', json.dumps(AlterState(value, token, character, equVersion).to_dict()), int(expire)) + redis.set(f'token:{token}', json.dumps(AlterState(value, token, character, equVersion,expire).to_dict()), int(expire)) return token