From c4338024c90cd36a330d42194bb553525828fa3b Mon Sep 17 00:00:00 2001 From: zhaoqingang <zhaoqg0118@163.com> Date: 星期五, 14 二月 2025 16:28:10 +0800 Subject: [PATCH] 问题优化 --- app/api/user.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/app/api/user.py b/app/api/user.py index 52d1e0f..c66869e 100644 --- a/app/api/user.py +++ b/app/api/user.py @@ -23,7 +23,7 @@ async def add_user(user: UserInfo, current_user: UserModel = Depends(get_current_user), db=Depends(get_db)): if not user.userName: return Response(code=400, msg="The userName cannot be empty!") - if "@" in user.username: + if "@" in user.userName: return Response(code=400, msg="Username cannot contain @") if user.pwd: if not is_valid_password(user.pwd): -- Gitblit v1.8.0