aboutsummaryrefslogtreecommitdiffstats
path: root/src/api.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-05-03 20:55:48 -0400
committerJesse Luehrs <doy@tozt.net>2020-05-03 20:55:48 -0400
commit77d005513f9a547129fee7c8760eff0bac30bd3c (patch)
treeac1b4dae47105ecf650027d1fe6c2ae88680f704 /src/api.rs
parentdcca2c702999997ebdc2ae7acd1228edf7333014 (diff)
downloadrbw-77d005513f9a547129fee7c8760eff0bac30bd3c.tar.gz
rbw-77d005513f9a547129fee7c8760eff0bac30bd3c.zip
fix editing organization entries
Diffstat (limited to 'src/api.rs')
-rw-r--r--src/api.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api.rs b/src/api.rs
index 3eef840..73b970f 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -307,6 +307,8 @@ struct CiphersPostReq {
struct CiphersPutReq {
#[serde(rename = "type")]
ty: u32, // XXX what are the valid types?
+ #[serde(rename = "organizationId")]
+ organization_id: Option<String>,
name: String,
notes: Option<String>,
login: Option<CipherLogin>,
@@ -594,6 +596,7 @@ impl Client {
&self,
access_token: &str,
id: &str,
+ org_id: Option<&str>,
name: &str,
data: &crate::db::EntryData,
notes: Option<&str>,
@@ -601,6 +604,7 @@ impl Client {
) -> Result<()> {
let mut req = CiphersPutReq {
ty: 1,
+ organization_id: org_id.map(std::string::ToString::to_string),
name: name.to_string(),
notes: notes.map(std::string::ToString::to_string),
login: None,