From 0402e161b1a3b69af3cc8ede2fcaf1c4855b601b Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 18 Apr 2020 02:34:58 -0400 Subject: support adding entries with notes --- src/api.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/api.rs') diff --git a/src/api.rs b/src/api.rs index b5502e6..7ff0a8c 100644 --- a/src/api.rs +++ b/src/api.rs @@ -150,6 +150,8 @@ pub struct Cipher { pub name: String, #[serde(rename = "Login")] pub login: Login, + #[serde(rename = "Notes")] + pub notes: Option, } #[derive(serde::Serialize, serde::Deserialize, Debug)] @@ -250,18 +252,13 @@ impl Client { } } - pub fn add( - &self, - access_token: &str, - cipher: &Cipher, - // TODO: note - ) -> Result<()> { + pub fn add(&self, access_token: &str, cipher: &Cipher) -> Result<()> { let req = CiphersPostReq { ty: 1, folder_id: None, organization_id: None, name: cipher.name.clone(), - notes: None, + notes: cipher.notes.clone(), favorite: false, login: CiphersPostReqLogin { uri: None, -- cgit v1.2.3-54-g00ecf