aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-client/src/record
diff options
context:
space:
mode:
Diffstat (limited to 'crates/atuin-client/src/record')
-rw-r--r--crates/atuin-client/src/record/sync.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/crates/atuin-client/src/record/sync.rs b/crates/atuin-client/src/record/sync.rs
index 234c6442..c3794b59 100644
--- a/crates/atuin-client/src/record/sync.rs
+++ b/crates/atuin-client/src/record/sync.rs
@@ -55,7 +55,10 @@ pub async fn diff(
) -> Result<(Vec<Diff>, RecordStatus), SyncError> {
let client = Client::new(
&settings.sync_address,
- &settings.session_token,
+ settings
+ .session_token()
+ .map_err(|e| SyncError::RemoteRequestError { msg: e.to_string() })?
+ .as_str(),
settings.network_connect_timeout,
settings.network_timeout,
)
@@ -270,7 +273,10 @@ pub async fn sync_remote(
) -> Result<(i64, Vec<RecordId>), SyncError> {
let client = Client::new(
&settings.sync_address,
- &settings.session_token,
+ settings
+ .session_token()
+ .map_err(|e| SyncError::RemoteRequestError { msg: e.to_string() })?
+ .as_str(),
settings.network_connect_timeout,
settings.network_timeout,
)