This commit is contained in:
Dave Gallant
2023-02-06 21:07:17 -05:00
committed by GitHub
parent 7459fc2320
commit a524bacdeb
3 changed files with 194 additions and 214 deletions

View File

@@ -53,7 +53,7 @@ pub fn send(topic: &Topic, posts: &Posts, expression: &str, config: &Config) {
debug!("Sending email notification.");
match sg.send(mail_info) {
Err(err) => println!("SendGrid failed to send mail. Error: {}", err),
Ok(body) => println!("SendGrid Response: {:?}", body),
Err(err) => println!("SendGrid failed to send mail. Error: {err}"),
Ok(body) => println!("SendGrid Response: {body:?}"),
};
}

View File

@@ -48,8 +48,7 @@ pub async fn get_hot_deals() -> Result<String, Box<dyn std::error::Error>> {
#[tokio::main]
pub async fn get_topic(topic_id: u32) -> Result<String, Box<dyn std::error::Error>> {
let resp = reqwest::get(&format!(
"https://forums.redflagdeals.com/api/topics/{}/posts?per_page=1&page=1",
topic_id
"https://forums.redflagdeals.com/api/topics/{topic_id}/posts?per_page=1&page=1"
))
.await?
.text()