Added body serializing

This commit is contained in:
2025-06-28 16:55:31 -04:00
parent 47a3b60b8d
commit e4a235e15a
2 changed files with 15 additions and 1 deletions

View File

@@ -81,7 +81,15 @@ async fn some_work(
)
.await
{
Ok(_response) => Ok(()),
Ok(response) => {
match response.json::<update_queued_song::response::Response>().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(),

View File

@@ -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<uuid::Uuid>,
}
}