mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 05:26:59 +00:00
refactor: disable account before creating audit action
This commit is contained in:
@@ -39,6 +39,8 @@ pub async fn admin_account_disable(
|
||||
}
|
||||
}
|
||||
|
||||
db.disable_authifier_account(&target.id).await?;
|
||||
|
||||
create_audit_action(
|
||||
db,
|
||||
&user.id,
|
||||
@@ -49,7 +51,5 @@ pub async fn admin_account_disable(
|
||||
)
|
||||
.await?;
|
||||
|
||||
db.disable_authifier_account(&target.id).await?;
|
||||
|
||||
Ok(EmptyResponse)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user