diff --git a/src/main.rs b/src/main.rs index 5b2cd4d..f243265 100644 --- a/src/main.rs +++ b/src/main.rs @@ -81,7 +81,15 @@ async fn some_work( ) .await { - Ok(_response) => Ok(()), + Ok(response) => { + match response.json::().await { + Ok(_inner_response) => { + Ok(()) + } + Err(err) => Err(std::io::Error::new(std::io::ErrorKind::Other, + err.to_string())) + } + } Err(err) => Err(std::io::Error::new( std::io::ErrorKind::Other, err.to_string(), diff --git a/src/update_queued_song.rs b/src/update_queued_song.rs index 56cb753..bde96b3 100644 --- a/src/update_queued_song.rs +++ b/src/update_queued_song.rs @@ -27,4 +27,10 @@ pub async fn update_queued_song( pub mod response { use serde::{Deserialize, Serialize}; + + #[derive(Debug, Deserialize, Serialize)] + pub struct Response { + pub message: String, + pub data: Vec, + } }