mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
fix: refactor account disabling logic to use disable method
This commit is contained in:
@@ -261,12 +261,10 @@ impl Database {
|
||||
.await
|
||||
.map_err(|_| create_database_error!("find_account", "accounts"))?;
|
||||
|
||||
account.disabled = true;
|
||||
|
||||
auth.database
|
||||
.save_account(&account)
|
||||
account
|
||||
.disable(&auth)
|
||||
.await
|
||||
.map_err(|_| create_database_error!("save_account", "accounts"))?;
|
||||
.map_err(|_| create_database_error!("disable_account", "accounts"))?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user