fix async

This commit is contained in:
jxxghp
2025-07-31 07:07:14 +08:00
parent c5a3bbcecf
commit 749aaeb003
5 changed files with 76 additions and 100 deletions

View File

@@ -45,9 +45,8 @@ async def create_user(
if user_info.get("password"):
user_info["hashed_password"] = get_password_hash(user_info["password"])
user_info.pop("password")
user = User(**user_info)
await user.async_create(db)
return schemas.Response(success=True)
user = await User(**user_info).async_create(db)
return schemas.Response(success=True if user else False)
@router.put("/", summary="更新用户", response_model=schemas.Response)