Got things working

This commit is contained in:
kdeng00
2025-04-29 21:18:45 -04:00
parent 4597f2d016
commit a6a682f458
+10 -8
View File
@@ -239,12 +239,10 @@ pub mod endpoint {
let mut response = super::response::fetch_metadata::Response::default();
// TODO: Make sure id works as well
match (params.id, params.song_queue_id) {
(Some(id), Some(song_queue_id)) => {
println!("Something works {:?} {:?}", id, song_queue_id);
match params.id {
Some(id) => {
println!("Something works {:?}", id);
if !id.is_nil() {
println!("Id is not nil");
match super::metadata_queue::get_with_id(&pool, &id).await {
Ok(item) => {
@@ -257,7 +255,10 @@ pub mod endpoint {
(StatusCode::BAD_REQUEST, Json(response))
}
}
} else {
}
_ => {
match params.song_queue_id {
Some(song_queue_id) => {
println!("Song queue Id is probably not nil");
match super::metadata_queue::get_with_song_queue_id(&pool, &song_queue_id).await
{
@@ -272,11 +273,12 @@ pub mod endpoint {
}
}
}
}
_ => {
None => {
println!("What is going on?");
(StatusCode::BAD_REQUEST, Json(response))
}
}
}
}
}
}