Skip to content

Commit

Permalink
fix twitter decode bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Sep 13, 2024
1 parent 591a6c1 commit eb7ff26
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
5 changes: 3 additions & 2 deletions src/twitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ pub async fn send_tweet(tokens: AccessTokens, tweet: String) -> eyre::Result<Str
.body(body)
.send()
.await?;

let tweet_response: SendTweetResponse = resp.json().await?;
let resp_clone = resp.text().await?;
let tweet_response: SendTweetResponse = serde_json::from_str(&resp_clone)
.expect(&format!("Failed to parse SendTweetResponse: {:?}", resp_clone));
log::info!("Tweet response: {:?}", tweet_response);
Ok(tweet_response.data.id)
}
Expand Down
5 changes: 0 additions & 5 deletions teleport.env

This file was deleted.

8 changes: 4 additions & 4 deletions teleport.env.staging
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
WS_RPC_URL=wss://base-sepolia.g.alchemy.com/v2/
RPC_URL=https://base-sepolia.g.alchemy.com/v2/
WS_RPC_URL=wss://base-mainnet.g.alchemy.com/v2/
RPC_URL=https://base-mainnet.g.alchemy.com/v2/
TEE_URL=teleport-stage.tee.cash
NFT_ADDRESS=0xB92414bA565D8d49E4aaaB45b78b354516006AF1
DB_PATH=NULL
NFT_ADDRESS=0xb0BFB5A7111c455780664ca3BF7d136B896E5F6D
DB_PATH=/root/save/main.db

0 comments on commit eb7ff26

Please sign in to comment.