From c966f133bea46f5d1b804296b270955478fa0ac4 Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期二, 18 二月 2025 13:42:35 +0800
Subject: [PATCH] 报表合并问题处理
---
app/api/user.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/app/api/user.py b/app/api/user.py
index 57171ff..c66869e 100644
--- a/app/api/user.py
+++ b/app/api/user.py
@@ -23,6 +23,8 @@
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:
+ return Response(code=400, msg="Username cannot contain @")
if user.pwd:
if not is_valid_password(user.pwd):
return Response(code=400, msg="The password must be at least 8 and contain both numbers and letters")
--
Gitblit v1.8.0