diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-05-03 20:55:48 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-05-03 20:55:48 -0400 |
commit | 77d005513f9a547129fee7c8760eff0bac30bd3c (patch) | |
tree | ac1b4dae47105ecf650027d1fe6c2ae88680f704 /src/bin/rbw/commands.rs | |
parent | dcca2c702999997ebdc2ae7acd1228edf7333014 (diff) | |
download | rbw-77d005513f9a547129fee7c8760eff0bac30bd3c.tar.gz rbw-77d005513f9a547129fee7c8760eff0bac30bd3c.zip |
fix editing organization entries
Diffstat (limited to 'src/bin/rbw/commands.rs')
-rw-r--r-- | src/bin/rbw/commands.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/bin/rbw/commands.rs b/src/bin/rbw/commands.rs index ab0fd21..fa4cc39 100644 --- a/src/bin/rbw/commands.rs +++ b/src/bin/rbw/commands.rs @@ -643,10 +643,17 @@ pub fn edit(name: &str, username: Option<&str>) -> anyhow::Result<()> { let (password, notes) = parse_editor(&contents); let password = password - .map(|password| crate::actions::encrypt(&password, None)) + .map(|password| { + crate::actions::encrypt( + &password, + entry.org_id.as_deref(), + ) + }) .transpose()?; let notes = notes - .map(|notes| crate::actions::encrypt(¬es, None)) + .map(|notes| { + crate::actions::encrypt(¬es, entry.org_id.as_deref()) + }) .transpose()?; let mut history = entry.history.clone(); let (entry_username, entry_password) = match &entry.data { @@ -680,6 +687,7 @@ pub fn edit(name: &str, username: Option<&str>) -> anyhow::Result<()> { &access_token, &refresh_token, &entry.id, + entry.org_id.as_deref(), &entry.name, &data, notes.as_deref(), |