aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-04-19 07:41:06 -0400
committerJesse Luehrs <doy@tozt.net>2020-04-19 16:57:33 -0400
commiteeabcbeb6090852bf0bdefe1e0799cb39cf0730b (patch)
tree88dee6617f065013486ed4933d47d6d3b225546d
parent769f0fddf89fff7c026d70857cb0e7c4fa55d759 (diff)
downloadrbw-eeabcbeb6090852bf0bdefe1e0799cb39cf0730b.tar.gz
rbw-eeabcbeb6090852bf0bdefe1e0799cb39cf0730b.zip
more model cleanup
-rw-r--r--src/api.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/api.rs b/src/api.rs
index 89da6d7..44e53a4 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -141,22 +141,15 @@ struct SyncResPasswordHistory {
struct CiphersPostReq {
#[serde(rename = "type")]
ty: u32, // XXX what are the valid types?
- #[serde(rename = "folderId")]
- folder_id: Option<String>,
- #[serde(rename = "organizationId")]
- organization_id: Option<String>,
name: String,
notes: Option<String>,
- favorite: bool,
login: CiphersPostReqLogin,
}
#[derive(serde::Serialize, Debug)]
struct CiphersPostReqLogin {
- uri: Option<String>,
username: Option<String>,
password: Option<String>,
- totp: Option<String>,
}
#[derive(serde::Serialize, Debug)]
@@ -302,16 +295,11 @@ impl Client {
) -> Result<()> {
let req = CiphersPostReq {
ty: 1,
- folder_id: None,
- organization_id: None,
name: name.to_string(),
notes: notes.map(std::string::ToString::to_string),
- favorite: false,
login: CiphersPostReqLogin {
- uri: None,
username: username.map(std::string::ToString::to_string),
password: password.map(std::string::ToString::to_string),
- totp: None,
},
};
let client = reqwest::blocking::Client::new();