zhaoqingang
2025-02-18 c966f133bea46f5d1b804296b270955478fa0ac4
app/api/auth.py
@@ -170,6 +170,8 @@
@router.post("/v2/register", response_model=Response)
async def register_v2(user: UserCreate, db=Depends(get_db)):
    if "@" in user.username:
        return Response(code=400, msg="Username cannot contain @")
    password = await password_rsa(user.password)
    if not is_valid_password(password):
        return Response(code=400, msg="The password must be at least 8 and contain both numbers and letters")