Fetch next queued song #125
@@ -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";
|
||||
}
|
||||
|
||||
+1
-1
@@ -246,7 +246,7 @@ const ALLOWED_EXTENSION: &str = "flac";
|
||||
pub async fn download_flac(
|
||||
axum::Extension(pool): axum::Extension<sqlx::PgPool>,
|
||||
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 {
|
||||
Ok(data) => {
|
||||
|
||||
+1
-1
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user