feat(api): add update password
This commit is contained in:
@@ -14,7 +14,7 @@ from api.db.logic.account import (
|
||||
get_user_by_login,
|
||||
update_user_by_id,
|
||||
)
|
||||
from api.db.logic.keyring import create_password_key
|
||||
from api.db.logic.keyring import create_password_key, update_password_key
|
||||
from api.db.tables.account import AccountStatus
|
||||
from api.schemas.account.account import User
|
||||
from api.schemas.base import bearer_schema
|
||||
@@ -95,6 +95,9 @@ async def update_account(
|
||||
if user is None:
|
||||
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="Account not found")
|
||||
|
||||
if user_update.password is not None:
|
||||
await update_password_key(connection, user.id, user_update.password)
|
||||
|
||||
update_values = update_user_data_changes(user_update, user)
|
||||
|
||||
if update_values is None:
|
||||
|
Reference in New Issue
Block a user