From 9d8bfbf7c8e88cc58afae36cfb5d3622fbb6a437 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Sat, 26 Apr 2025 18:00:13 -0400 Subject: [PATCH] Got it working --- src/callers/mod.rs | 1 + src/callers/song.rs | 2 +- src/main.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/callers/mod.rs b/src/callers/mod.rs index e6ff83a..aac314c 100644 --- a/src/callers/mod.rs +++ b/src/callers/mod.rs @@ -3,6 +3,7 @@ pub mod song; pub mod endpoints { pub const QUEUESONG: &str = "/api/v2/song/queue"; + pub const QUEUESONGDATA: &str = "/api/v2/song/queue/{id}"; pub const NEXTQUEUESONG: &str = "/api/v2/song/queue/next"; pub const QUEUEMETADATA: &str = "/api/v2/song/metadata/queue"; } diff --git a/src/callers/song.rs b/src/callers/song.rs index 8ff144c..81b3a28 100644 --- a/src/callers/song.rs +++ b/src/callers/song.rs @@ -246,7 +246,7 @@ const ALLOWED_EXTENSION: &str = "flac"; pub async fn download_flac( axum::Extension(pool): axum::Extension, axum::extract::Path(id): axum::extract::Path) -> (StatusCode, axum::response::Response) { - pritnln!("Id: {:?}", id); + println!("Id: {:?}", id); match song_queue::get_data(&pool, &id).await { Ok(data) => { diff --git a/src/main.rs b/src/main.rs index 1075ae1..09541e6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -70,7 +70,7 @@ pub mod init { post(crate::callers::song::endpoint::queue_song), ) .route( - crate::callers::endpoints::QUEUESONG, + crate::callers::endpoints::QUEUESONGDATA, get(crate::callers::song::endpoint::download_flac), ) .route(