From afc6d2fb5e8baa8f6a027db3aef4c3d926271b2f Mon Sep 17 00:00:00 2001 From: lzh Date: Fri, 23 Jan 2026 23:11:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=20hash=5Fpassword=20?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E4=BF=AE=E5=A4=8D=E6=B3=A8=E5=86=8C=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 注册时使用 hash_password 但未导入该函数 - 导致 NameError: name 'hash_password' is not defined Co-Authored-By: Claude Opus 4.5 --- src/vitals/web/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vitals/web/app.py b/src/vitals/web/app.py index 41da6ee..3b717c1 100644 --- a/src/vitals/web/app.py +++ b/src/vitals/web/app.py @@ -15,7 +15,7 @@ from uuid import uuid4 from ..core import database as db from ..core.models import Exercise, Meal, Sleep, UserConfig, Weight, User, Reading, Invite -from ..core.auth import verify_password, create_token, decode_token, generate_invite_code, get_token_expire_seconds +from ..core.auth import hash_password, verify_password, create_token, decode_token, generate_invite_code, get_token_expire_seconds # 初始化数据库 db.init_db()