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(
|
create_audit_action(
|
||||||
db,
|
db,
|
||||||
&user.id,
|
&user.id,
|
||||||
@@ -49,7 +51,5 @@ pub async fn admin_account_disable(
|
|||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
db.disable_authifier_account(&target.id).await?;
|
|
||||||
|
|
||||||
Ok(EmptyResponse)
|
Ok(EmptyResponse)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user