mirror of
https://framagit.org/veretcle/oolatoocs.git
synced 2025-07-20 20:41:17 +02:00
♻ : avoid url duplication
This commit is contained in:
@@ -118,14 +118,15 @@ pub async fn delete_tweet(config: &TwitterConfig, id: u64) -> Result<(), Box<dyn
|
||||
debug!("Deleting Tweet {}", id);
|
||||
let empty_request = EmptyRequest {}; // Why? Because fuck you, that’s why!
|
||||
let token = get_token(config);
|
||||
let delete_uri = format!("{}/{}", TWITTER_API_TWEET_URL, id);
|
||||
|
||||
let client = Client::new();
|
||||
let res = client
|
||||
.delete(format!("{}/{}", TWITTER_API_TWEET_URL, id))
|
||||
.delete(&delete_uri)
|
||||
.header(
|
||||
"Authorization",
|
||||
oauth1_request::delete(
|
||||
format!("{}/{}", TWITTER_API_TWEET_URL, id),
|
||||
&delete_uri,
|
||||
&empty_request,
|
||||
&token,
|
||||
oauth1_request::HMAC_SHA1,
|
||||
|
Reference in New Issue
Block a user