From 9b4d23d73f6638395f4efcee9d44ad08aa7375b8 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Wed, 22 Oct 2025 20:43:01 -0400 Subject: [PATCH 1/5] tsk-211: Fixing error on getting queue item --- src/repo/queue/song.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/repo/queue/song.rs b/src/repo/queue/song.rs index 3ff854c..f69326e 100644 --- a/src/repo/queue/song.rs +++ b/src/repo/queue/song.rs @@ -97,10 +97,12 @@ pub async fn get_most_recent_and_update(pool: &sqlx::PgPool) -> Result { -- 2.47.3 From db17fdc0c567b6708f4ca08c9efc6891365bb1bd Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Wed, 22 Oct 2025 20:48:57 -0400 Subject: [PATCH 2/5] tsk-211: Some cleanup --- src/auth.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/auth.rs b/src/auth.rs index 6950308..d707b8e 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -67,8 +67,6 @@ pub async fn auth( req: Request, next: Next, ) -> Result)> { - println!("Cookie: {cookie_jar:?}"); - let token = cookie_jar .get("token") .map(|cookie| cookie.value().to_string()) @@ -76,10 +74,7 @@ pub async fn auth( req.headers() .get(axum::http::header::AUTHORIZATION) .and_then(|auth_header| auth_header.to_str().ok()) - .and_then(|auth_value| { - println!("Auth value: {auth_value:?}"); - auth_value.strip_prefix("Bearer ").map(String::from) - }) + .and_then(|auth_value| auth_value.strip_prefix("Bearer ").map(String::from)) }); let token = token.ok_or_else(|| { @@ -94,9 +89,8 @@ pub async fn auth( let mut validation = Validation::new(jsonwebtoken::Algorithm::HS256); validation.set_audience(&["icarus"]); // Must match exactly what's in the token - let claims = decode::( + let _claims = decode::( &token, - // TODO: Replace with code to get secret from env &DecodingKey::from_secret(secret_key.as_ref()), &validation, ) @@ -110,7 +104,5 @@ pub async fn auth( })? .claims; - println!("Claims: {claims:?}"); - Ok(next.run(req).await) } -- 2.47.3 From d56479fd5710b1a2fadb2a0ad2e61ef4664c495a Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Wed, 22 Oct 2025 20:50:57 -0400 Subject: [PATCH 3/5] tsk-211: Cleanup --- src/repo/queue/song.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/repo/queue/song.rs b/src/repo/queue/song.rs index f69326e..6505238 100644 --- a/src/repo/queue/song.rs +++ b/src/repo/queue/song.rs @@ -98,11 +98,6 @@ pub async fn get_most_recent_and_update(pool: &sqlx::PgPool) -> Result { -- 2.47.3 From c95d1d8dbd69f52fdb9d6811bb115febee64e169 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Wed, 22 Oct 2025 21:36:46 -0400 Subject: [PATCH 4/5] tsk-211: Updated readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e3b04d2..9e64c45 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,11 @@ Web API for the Icarus project. ### Requires -`icarus_auth` v0.6.1 -`songparser` v0.4.2 +`icarus_auth` +v0.6.5 +`songparser` +v0.4.8 ### Compatible with -`icarus-dm` v0.8.2 +`icarus-dm` v0.8.4 ## Getting Started -- 2.47.3 From dffc99d091b0f5cc2b69a38a7fe0410d3bedf5fe Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Wed, 22 Oct 2025 21:37:16 -0400 Subject: [PATCH 5/5] tsk-211: Version bump --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e72a72b..f4c243c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -834,7 +834,7 @@ dependencies = [ [[package]] name = "icarus" -version = "0.3.3" +version = "0.3.4" dependencies = [ "axum", "axum-extra", diff --git a/Cargo.toml b/Cargo.toml index 6ffbee2..12f5349 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "icarus" -version = "0.3.3" +version = "0.3.4" edition = "2024" rust-version = "1.90" -- 2.47.3