diff options
Diffstat (limited to 'crates/turtle/src/command/client/account/delete.rs')
| -rw-r--r-- | crates/turtle/src/command/client/account/delete.rs | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/crates/turtle/src/command/client/account/delete.rs b/crates/turtle/src/command/client/account/delete.rs index 1c96cb4a..722c39ec 100644 --- a/crates/turtle/src/command/client/account/delete.rs +++ b/crates/turtle/src/command/client/account/delete.rs @@ -1,11 +1,8 @@ -use crate::atuin_client::{ - auth::{self, MutateResponse}, - settings::Settings, -}; +use crate::atuin_client::{auth, settings::Settings}; use clap::Parser; use eyre::{Result, bail}; -use super::login::{or_user_input, read_user_password}; +use super::login::read_user_password; #[derive(Parser, Debug)] pub(crate) struct Cmd { @@ -33,18 +30,9 @@ impl Cmd { let mut totp_code = self.totp_code.clone(); - loop { - let response = client - .delete_account(&password, totp_code.as_deref()) - .await?; - - match response { - MutateResponse::Success => break, - MutateResponse::TwoFactorRequired => { - totp_code = Some(or_user_input(None, "two-factor code")); - } - } - } + client + .delete_account(&password, totp_code.as_deref()) + .await?; // Clean up sessions from meta store let meta = Settings::meta_store().await?; |
