summaryrefslogtreecommitdiffstats
path: root/atuin-client/src/api_client.rs
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2021-05-09 22:31:11 +0100
committerGitHub <noreply@github.com>2021-05-09 22:31:11 +0100
commitc16a26cdbfdfcbd15549165b08b2c4c80eecc3f0 (patch)
tree08ee40ccbd619ec8915d2183606e8a418ca574ac /atuin-client/src/api_client.rs
parentde2e34ac500c17e80fe4dcf2ed1c08add8998fa3 (diff)
Fix sync (#95)
The data part of the add history request is actually a string. I don't want to introduce any structure here, and would rather keep it as "just a blob". Even if that blob has structure secretly! My fault for missing this in the last review
Diffstat (limited to 'atuin-client/src/api_client.rs')
-rw-r--r--atuin-client/src/api_client.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/atuin-client/src/api_client.rs b/atuin-client/src/api_client.rs
index 4b0c98c7..24922836 100644
--- a/atuin-client/src/api_client.rs
+++ b/atuin-client/src/api_client.rs
@@ -12,7 +12,7 @@ use atuin_common::api::{
};
use atuin_common::utils::hash_str;
-use crate::encryption::{decode_key, decrypt, EncryptedHistory};
+use crate::encryption::{decode_key, decrypt};
use crate::history::History;
static APP_USER_AGENT: &str = concat!("atuin/", env!("CARGO_PKG_VERSION"),);
@@ -140,10 +140,7 @@ impl<'a> Client<'a> {
Ok(history)
}
- pub async fn post_history(
- &self,
- history: &[AddHistoryRequest<'_, EncryptedHistory>],
- ) -> Result<()> {
+ pub async fn post_history(&self, history: &[AddHistoryRequest<'_, String>]) -> Result<()> {
let url = format!("{}/history", self.sync_addr);
let url = Url::parse(url.as_str())?;