Added code to wipe song queue data
This commit is contained in:
@@ -76,5 +76,27 @@ pub mod create_coverart {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Wipe data from queued song
|
||||
// TODO: Wipe data from queued coverart
|
||||
pub mod wipe_data {
|
||||
// TODO: Wipe data from queued song
|
||||
pub mod song_queue {
|
||||
pub async fn wipe_data(base_url: &String, song_queue_id: &uuid::Uuid) -> Result<reqwest::Response, reqwest::Error> {
|
||||
let client = reqwest::Client::builder().build()?;
|
||||
let url = format!("{base_url}/api/v2/coverart");
|
||||
let payload = serde_json::json!({
|
||||
"song_queue_id": song_queue_id
|
||||
});
|
||||
let request = client.post(url).json(&payload);
|
||||
|
||||
request.send().await
|
||||
}
|
||||
|
||||
pub mod response {
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize)]
|
||||
pub struct Response {
|
||||
pub message: String,
|
||||
pub data: Vec<uuid::Uuid>,
|
||||
}
|
||||
}
|
||||
}
|
||||
// TODO: Wipe data from queued coverart
|
||||
}
|
||||
|
Reference in New Issue
Block a user