Get token #8

Merged
phoenix merged 9 commits from get_token into v0.3.0 2026-06-24 14:50:15 -04:00
2 changed files with 15 additions and 1 deletions
Showing only changes of commit 5f3e4dc64b - Show all commits
+10 -1
View File
@@ -30,11 +30,20 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut svc = catapult::service::core::Service {
app: app.clone(),
token,
// Use a pointer
token: token.clone(),
};
loop {
// catapult::service::do_the_work(&app).await;
let refresh_token = match auth.get_refresh_token(&token).await {
Ok(refresh) => refresh,
Err(err) => {
eprintln!("Error: {err:?}");
std::process::exit(-1);
}
};
println!("Refresh token: {refresh_token:?}");
svc.do_the_work().await;
tokio::time::sleep(tokio::time::Duration::from_secs(
catapult::app::SECONDS_TO_SLEEP,
+5
View File
@@ -110,6 +110,11 @@ pub mod auth {
Err(err) => Err(std::io::Error::other(err.to_string())),
}
}
pub async fn has_token_expired(token: &textsender_models::token::LoginResult) -> bool {
todo!("Need to finish this");
false
}
}