File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,10 +109,10 @@ pub async fn connect_cloud_sync(
109109#[ tauri:: command]
110110pub fn get_sync_auth_status ( db : State < ' _ , Arc < Mutex < Database > > > ) -> Result < SyncAuthStatus , String > {
111111 let db = db. lock ( ) . map_err ( |e| e. to_string ( ) ) ?;
112- let token = db. get_setting ( "github_token" ) ;
113- let username = db. get_setting ( "sync_username" ) ;
114- let gist_id = db. get_setting ( "sync_gist_id" ) ;
115- let gist_url = db. get_setting ( "sync_gist_url" ) ;
112+ let token = db. get_setting ( "github_token" ) . filter ( |s| !s . is_empty ( ) ) ;
113+ let username = db. get_setting ( "sync_username" ) . filter ( |s| !s . is_empty ( ) ) ;
114+ let gist_id = db. get_setting ( "sync_gist_id" ) . filter ( |s| !s . is_empty ( ) ) ;
115+ let gist_url = db. get_setting ( "sync_gist_url" ) . filter ( |s| !s . is_empty ( ) ) ;
116116 let has_gh = has_gh_cli ( ) ;
117117
118118 Ok ( SyncAuthStatus {
You can’t perform that action at this time.
0 commit comments