diff --git a/src/main.rs b/src/main.rs index a589be0..23cfb11 100644 --- a/src/main.rs +++ b/src/main.rs @@ -81,7 +81,8 @@ async fn process_song(api_url: &String, song_queue_id: &uuid::Uuid) -> Result<() println!("Created at: {:?}", created_at); println!("Getting coverart queue"); - match api::get_coverart_queue::get(api_url, song_queue_id).await { + match api::get_coverart_queue::get(api_url, song_queue_id).await + { Ok(response) => { match response.json::().await { Ok(response) => { @@ -265,11 +266,18 @@ mod api { } pub mod get_coverart_queue { - pub async fn get(base_url: &String, song_queue_id: &uuid::Uuid) -> Result { + pub async fn get( + base_url: &String, + song_queue_id: &uuid::Uuid, + ) -> Result { let client = reqwest::Client::new(); let endpoint = String::from("api/v2/coverart/queue"); let api_url = format!("{}/{}", base_url, endpoint); - client.get(api_url).query(&[("song_queue_id", song_queue_id)]).send().await + client + .get(api_url) + .query(&[("song_queue_id", song_queue_id)]) + .send() + .await } pub mod response { @@ -284,7 +292,7 @@ mod api { #[derive(Debug, Deserialize, Serialize)] pub struct Response { pub message: String, - pub data: Vec + pub data: Vec, } } }