Fetch next queued song #125

Merged
kdeng00 merged 6 commits from fetch_next_queued_song into v0.2 2025-04-26 18:38:17 -04:00
3 changed files with 3 additions and 2 deletions
Showing only changes of commit 9d8bfbf7c8 - Show all commits
+1
View File
@@ -3,6 +3,7 @@ pub mod song;
pub mod endpoints { pub mod endpoints {
pub const QUEUESONG: &str = "/api/v2/song/queue"; 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 NEXTQUEUESONG: &str = "/api/v2/song/queue/next";
pub const QUEUEMETADATA: &str = "/api/v2/song/metadata/queue"; pub const QUEUEMETADATA: &str = "/api/v2/song/metadata/queue";
} }
+1 -1
View File
@@ -246,7 +246,7 @@ const ALLOWED_EXTENSION: &str = "flac";
pub async fn download_flac( pub async fn download_flac(
axum::Extension(pool): axum::Extension<sqlx::PgPool>, axum::Extension(pool): axum::Extension<sqlx::PgPool>,
axum::extract::Path(id): axum::extract::Path<uuid::Uuid>) -> (StatusCode, axum::response::Response) { axum::extract::Path(id): axum::extract::Path<uuid::Uuid>) -> (StatusCode, axum::response::Response) {
pritnln!("Id: {:?}", id); println!("Id: {:?}", id);
match song_queue::get_data(&pool, &id).await { match song_queue::get_data(&pool, &id).await {
Ok(data) => { Ok(data) => {
+1 -1
View File
@@ -70,7 +70,7 @@ pub mod init {
post(crate::callers::song::endpoint::queue_song), post(crate::callers::song::endpoint::queue_song),
) )
.route( .route(
crate::callers::endpoints::QUEUESONG, crate::callers::endpoints::QUEUESONGDATA,
get(crate::callers::song::endpoint::download_flac), get(crate::callers::song::endpoint::download_flac),
) )
.route( .route(