summaryrefslogtreecommitdiffstats
path: root/atuin-client/src/sync.rs
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2024-01-06 17:19:31 +0000
committerGitHub <noreply@github.com>2024-01-06 17:19:31 +0000
commit4e56f5a41e5224b816e9eafed145a03cbf52fd93 (patch)
tree3177cadbced62db723efaf6a7764f37e3c0e318a /atuin-client/src/sync.rs
parent179c6d20ef8f10fd4dcc1be57e05ed4b02e8c123 (diff)
refactor: String -> HistoryId (#1512)
Diffstat (limited to 'atuin-client/src/sync.rs')
-rw-r--r--atuin-client/src/sync.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/atuin-client/src/sync.rs b/atuin-client/src/sync.rs
index 5f612c715..99b423c2c 100644
--- a/atuin-client/src/sync.rs
+++ b/atuin-client/src/sync.rs
@@ -73,7 +73,7 @@ async fn sync_download(
.map(|h| serde_json::from_str(h).expect("invalid base64"))
.map(|h| decrypt(h, key).expect("failed to decrypt history! check your key"))
.map(|mut h| {
- if remote_deleted.contains(h.id.as_str()) {
+ if remote_deleted.contains(h.id.0.as_str()) {
h.deleted_at = Some(time::OffsetDateTime::now_utc());
h.command = String::from("");
}
@@ -157,7 +157,7 @@ async fn sync_upload(
let data = serde_json::to_string(&data)?;
let add_hist = AddHistoryRequest {
- id: i.id,
+ id: i.id.to_string(),
timestamp: i.timestamp,
data,
hostname: hash_str(&i.hostname),
@@ -177,7 +177,7 @@ async fn sync_upload(
let deleted = db.deleted().await?;
for i in deleted {
- if remote_deleted.contains(&i.id) {
+ if remote_deleted.contains(&i.id.to_string()) {
continue;
}