feat: Ability to edit & remove by name (not index only) #44
1 changed files with 1 additions and 0 deletions
|
@ -50,6 +50,7 @@ pub struct Add {
|
|||
impl LprsCommand for Add {
|
||||
fn run(mut self, mut vault_manager: Vaults) -> LprsResult<()> {
|
||||
if !self.vault_info.is_empty() {
|
||||
self.vault_info.name = self.vault_info.name.trim().to_string();
|
||||
self.vault_info.password = utils::user_password(self.password, "Vault password:")?;
|
||||
self.vault_info.custom_fields = self.custom_fields.into_iter().collect();
|
||||
vault_manager.add_vault(self.vault_info);
|
||||
|
|
Loading…
Reference in a new issue