Testys commited on
Commit
e67ad02
1 Parent(s): 4674427

Update users/services.py

Browse files
Files changed (1) hide show
  1. users/services.py +2 -2
users/services.py CHANGED
@@ -17,7 +17,7 @@ async def create_user_account(data: UserCreate, db: Session):
17
  last_name=data.last_name,
18
  age=data.age,
19
  preferences=data.preferences,
20
- hashed_password=get_password_hash(data.password),
21
  )
22
 
23
  db.add(new_user)
@@ -58,7 +58,7 @@ def update_user(db: Session, user_id: int, user: UserUpdate):
58
 
59
  update_data = user.dict(exclude_unset=True)
60
  if 'password' in update_data:
61
- update_data['hashed_password'] = get_password_hash(update_data['password'])
62
  del update_data['password']
63
 
64
  for key, value in update_data.items():
 
17
  last_name=data.last_name,
18
  age=data.age,
19
  preferences=data.preferences,
20
+ password=get_password_hash(data.password),
21
  )
22
 
23
  db.add(new_user)
 
58
 
59
  update_data = user.dict(exclude_unset=True)
60
  if 'password' in update_data:
61
+ update_data['password'] = get_password_hash(update_data['password'])
62
  del update_data['password']
63
 
64
  for key, value in update_data.items():