feat: roles init

This commit is contained in:
swve 2023-11-13 21:23:44 +01:00
parent a50fc67104
commit aa0eda5682
5 changed files with 113 additions and 109 deletions

View file

@ -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)