Cargo formatting
This commit is contained in:
@@ -22,12 +22,13 @@ impl Upload {
|
||||
let url = self.retrieve_url(&song);
|
||||
let client = reqwest::Client::new();
|
||||
let access_token = token.bearer_token();
|
||||
let response = client.post(&url)
|
||||
let response = client
|
||||
.post(&url)
|
||||
.header(reqwest::header::AUTHORIZATION, access_token)
|
||||
.send()
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
|
||||
match response.status() {
|
||||
reqwest::StatusCode::OK => {
|
||||
println!("Success!");
|
||||
@@ -38,7 +39,6 @@ impl Upload {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fn retrieve_url(&self, song: &models::song::Song) -> String {
|
||||
// let mut url: String = String::new();
|
||||
let api = &self.api;
|
||||
@@ -52,4 +52,4 @@ impl Upload {
|
||||
|
||||
return url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user