Added access token and device id persistance. Fixes #3
This commit is contained in:
parent
efc38e161c
commit
832c94069c
2 changed files with 6 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,2 @@
|
||||||
/target
|
/target
|
||||||
config.yaml
|
config.yaml*
|
|
@ -39,6 +39,11 @@ pub async fn get_clients(config: &mut Config) -> Vec<Client> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// If client is logged in, update the config to persist the session
|
||||||
|
if let Some(session) = client.session().await {
|
||||||
|
conf.access_token = Some(session.access_token);
|
||||||
|
conf.device_id = Some(session.device_id.to_string());
|
||||||
|
}
|
||||||
|
|
||||||
clients.push(client.clone());
|
clients.push(client.clone());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue