Need to try this out
swoosh Build / Check (pull_request) Successful in 36s
Release Tagging / release (pull_request) Successful in 39s
swoosh Build / Rustfmt (pull_request) Successful in 30s
swoosh Build / Test Suite (pull_request) Successful in 35s
swoosh Build / build (pull_request) Successful in 32s
swoosh Build / Clippy (pull_request) Successful in 37s

This commit is contained in:
2026-06-03 20:40:25 -04:00
parent f0ffc580e6
commit 29fcf41a9c
+11 -1
View File
@@ -60,7 +60,7 @@ pub async fn send_mssage(
params.insert("Body", msg.content.as_str());
let url = format!(
"https://api.twilio.com/2010-04-01/Accounts/ACefa1ef516314c9d1a68cbd657de49277/Messages.json"
"https://api.twilio.com/2010-04-01/Accounts/{}/Messages.json", config.account_sid
);
// let client = reqwest::Client::new();
@@ -73,6 +73,15 @@ pub async fn send_mssage(
match request.send().await {
Ok(response) => {
match response.json::<crate::twilio::api::types::TwilioAPIMessage>().await {
Ok(resp) => {
Ok(resp)
}
Err(err) => {
Err(std::io::Error::other(err))
}
}
/*
match response.text().await {
Ok(body) => {
let mut obj = crate::twilio::api::types::TwilioAPIMessage {
@@ -85,6 +94,7 @@ pub async fn send_mssage(
Err(std::io::Error::other(err))
}
}
*/
}
Err(err) => Err(std::io::Error::other(err.to_string())),
}