1
This commit is contained in:
parent
ab8023139f
commit
9cd39c3655
|
|
@ -116,12 +116,11 @@ async def get_account_detail(
|
|||
async def update_account(
|
||||
account_id: int,
|
||||
data: AccountUpdate,
|
||||
user: Dict[str, Any] = Depends(require_account_owner)
|
||||
user: Dict[str, Any] = Depends(get_current_user)
|
||||
):
|
||||
"""更新账号基本信息"""
|
||||
require_account_owner(account_id, user)
|
||||
try:
|
||||
# TODO: Implement Account.update() in models
|
||||
# For now, manually update allowed fields
|
||||
updates = {}
|
||||
if data.name is not None:
|
||||
updates['name'] = data.name
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user