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")