aboutsummaryrefslogtreecommitdiffstats
path: root/src/api.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-04-18 02:34:58 -0400
committerJesse Luehrs <doy@tozt.net>2020-04-18 02:34:58 -0400
commit0402e161b1a3b69af3cc8ede2fcaf1c4855b601b (patch)
tree0151b636301bd010c746b5b2730855ef30708f93 /src/api.rs
parent45343bb64d9230da0705d259c7f411d8af8d990f (diff)
downloadrbw-0402e161b1a3b69af3cc8ede2fcaf1c4855b601b.tar.gz
rbw-0402e161b1a3b69af3cc8ede2fcaf1c4855b601b.zip
support adding entries with notes
Diffstat (limited to 'src/api.rs')
-rw-r--r--src/api.rs11
1 files changed, 4 insertions, 7 deletions
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<String>,
}
#[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,