Changed PATCH /api/v2/song/queue/{id} endpoint

Modified the response body. Will just return a list of song queue id
This commit is contained in:
kdeng00
2025-06-28 16:25:33 -04:00
parent 329ba60dfc
commit 9750723ba8
+3 -3
View File
@@ -123,7 +123,7 @@ pub mod response {
#[derive(Default, serde::Deserialize, serde::Serialize)] #[derive(Default, serde::Deserialize, serde::Serialize)]
pub struct Response { pub struct Response {
pub message: String, pub message: String,
pub data: Vec<Vec<u8>>, pub data: Vec<uuid::Uuid>,
} }
} }
@@ -743,8 +743,8 @@ pub mod endpoint {
let raw_data: Vec<u8> = data.to_vec(); let raw_data: Vec<u8> = data.to_vec();
match song_queue::update(&pool, &raw_data, &id).await { match song_queue::update(&pool, &raw_data, &id).await {
Ok(queued_data) => { Ok(_queued_data) => {
response.data.push(queued_data); response.data.push(id);
(axum::http::StatusCode::OK, axum::Json(response)) (axum::http::StatusCode::OK, axum::Json(response))
} }
Err(err) => { Err(err) => {