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" 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 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) } diff --git a/src/repo/queue/song.rs b/src/repo/queue/song.rs index 3ff854c..6505238 100644 --- a/src/repo/queue/song.rs +++ b/src/repo/queue/song.rs @@ -97,10 +97,7 @@ pub async fn get_most_recent_and_update(pool: &sqlx::PgPool) -> Result {