tsk-55: Utilize the expiration methods in icarus_models #59

Merged
phoenix merged 6 commits from tsk-55 into main 2025-10-20 17:45:05 +00:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 7f22514ea8 - Show all commits

View File

@@ -30,8 +30,7 @@ pub async fn get_token(
// TODO: Might want to put the functionality within icarus_models at some point // TODO: Might want to put the functionality within icarus_models at some point
pub async fn did_token_expire(login_result: &icarus_models::login_result::LoginResult) -> bool { pub async fn did_token_expire(login_result: &icarus_models::login_result::LoginResult) -> bool {
let current_time = time::OffsetDateTime::now_utc(); let current_time = time::OffsetDateTime::now_utc();
let expire_time = let expire_time = time::OffsetDateTime::from_unix_timestamp(login_result.expiration).unwrap();
time::OffsetDateTime::from_unix_timestamp(login_result.expiration).unwrap();
current_time > expire_time current_time > expire_time
} }

View File

@@ -213,7 +213,8 @@ async fn some_work(
println!("CoverArt path: {coverart_queue_path:?}"); println!("CoverArt path: {coverart_queue_path:?}");
match metadata::apply_metadata(&song_queue_path, &coverart_queue_path, &metadata).await { match metadata::apply_metadata(&song_queue_path, &coverart_queue_path, &metadata).await
{
Ok(_applied) => { Ok(_applied) => {
match api::update_queued_song::update_queued_song( match api::update_queued_song::update_queued_song(
app, app,