diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-04-19 05:10:23 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-04-19 05:10:23 -0400 |
commit | 988296d6c9e053d632ee5610ba3432a02776b132 (patch) | |
tree | 5b5e1318e3d72b6ff21782436b17793ca2d74197 /src/actions.rs | |
parent | fe359afea6f2d3e0138af7773469914db9a1da7a (diff) | |
download | rbw-988296d6c9e053d632ee5610ba3432a02776b132.tar.gz rbw-988296d6c9e053d632ee5610ba3432a02776b132.zip |
track password history
Diffstat (limited to 'src/actions.rs')
-rw-r--r-- | src/actions.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/actions.rs b/src/actions.rs index 4dbe4ca..0a5bee4 100644 --- a/src/actions.rs +++ b/src/actions.rs @@ -105,9 +105,10 @@ pub fn edit( username: Option<&str>, password: Option<&str>, notes: Option<&str>, + history: &[crate::db::HistoryEntry], ) -> Result<(Option<String>, ())> { with_exchange_refresh_token(access_token, refresh_token, |access_token| { - edit_once(access_token, id, name, username, password, notes) + edit_once(access_token, id, name, username, password, notes, history) }) } @@ -118,11 +119,20 @@ fn edit_once( username: Option<&str>, password: Option<&str>, notes: Option<&str>, + history: &[crate::db::HistoryEntry], ) -> Result<()> { let config = crate::config::Config::load()?; let client = crate::api::Client::new(&config.base_url(), &config.identity_url()); - client.edit(access_token, id, name, username, password, notes)?; + client.edit( + access_token, + id, + name, + username, + password, + notes, + history, + )?; Ok(()) } |