From 8dc8448de0b9acaf9c3c27556d3c6c4342d8d493 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Tue, 21 May 2024 10:43:08 +0700 Subject: fix(daemon): do not try to sync if logged out (#2037) * fix(daemon): do not try to sync if logged out I've also added Settings::logged_in, as there are a few places where we switch on login state. * make session_token a function --- crates/atuin-client/src/sync.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/atuin-client/src/sync.rs') diff --git a/crates/atuin-client/src/sync.rs b/crates/atuin-client/src/sync.rs index 0a5021cb..c2377baa 100644 --- a/crates/atuin-client/src/sync.rs +++ b/crates/atuin-client/src/sync.rs @@ -191,7 +191,7 @@ async fn sync_upload( pub async fn sync(settings: &Settings, force: bool, db: &impl Database) -> Result<()> { let client = api_client::Client::new( &settings.sync_address, - &settings.session_token, + settings.session_token()?.as_str(), settings.network_connect_timeout, settings.network_timeout, )?; -- cgit v1.3.1