mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: roles init
This commit is contained in:
parent
a50fc67104
commit
aa0eda5682
5 changed files with 113 additions and 109 deletions
|
|
@ -164,6 +164,8 @@ async def update_user(
|
|||
for key, value in user_data.items():
|
||||
setattr(user, key, value)
|
||||
|
||||
user.update_date = str(datetime.now())
|
||||
|
||||
# Update user in database
|
||||
db_session.add(user)
|
||||
db_session.commit()
|
||||
|
|
@ -197,6 +199,8 @@ async def update_user_password(
|
|||
|
||||
# Update user
|
||||
user.password = await security_hash_password(form.new_password)
|
||||
user.update_date = str(datetime.now())
|
||||
|
||||
|
||||
# Update user in database
|
||||
db_session.add(user)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue