Răsfoiți Sursa

fix(backend): correct password hashing function name in admin_update_user

unknown 3 zile în urmă
părinte
comite
7a10cae165
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      backend/routers/auth.py

+ 1 - 1
backend/routers/auth.py

@@ -190,7 +190,7 @@ async def admin_update_user(target_id: int, data: schemas.AdminUserUpdate, admin
     # Handle password hashing
     if "password" in update_dict:
         password = update_dict.pop("password")
-        update_dict["password_hash"] = auth_utils.hash_password(password)
+        update_dict["password_hash"] = auth_utils.get_password_hash(password)
     
     for field, value in update_dict.items():
         update_fields.append(f"`{field}` = %s")