From 988296d6c9e053d632ee5610ba3432a02776b132 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 19 Apr 2020 05:10:23 -0400 Subject: track password history --- src/actions.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/actions.rs') 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, ())> { 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(()) } -- cgit v1.2.3-54-g00ecf