Fix bug
Release Tagging / release (pull_request) Successful in 36s
swoosh Build / Check (pull_request) Successful in 1m33s
swoosh Build / Test Suite (pull_request) Successful in 1m20s
swoosh Build / Rustfmt (pull_request) Successful in 26s
swoosh Build / build (pull_request) Successful in 1m11s
swoosh Build / Clippy (pull_request) Successful in 1m35s
Release Tagging / release (pull_request) Successful in 36s
swoosh Build / Check (pull_request) Successful in 1m33s
swoosh Build / Test Suite (pull_request) Successful in 1m20s
swoosh Build / Rustfmt (pull_request) Successful in 26s
swoosh Build / build (pull_request) Successful in 1m11s
swoosh Build / Clippy (pull_request) Successful in 1m35s
This commit is contained in:
@@ -32,17 +32,11 @@ pub async fn send_mssage(
|
||||
|
||||
let mut params = std::collections::HashMap::new();
|
||||
params.insert("To", contact.phone_number.as_str());
|
||||
// params.insert("StatusCallback", "http://OjQozHznkhNTTR.vpnrM1zdXFuiQ");
|
||||
// params.insert("MaxPrice", "1");
|
||||
params.insert("ProvideFeedback", "true");
|
||||
// params.insert("Attempt", "5");
|
||||
// params.insert("ValidityPeriod", "1537");
|
||||
params.insert("ForceDelivery", "false");
|
||||
params.insert("ContentRetention", "retain");
|
||||
params.insert("AddressRetention", "obfuscate");
|
||||
params.insert("SmartEncoded", "true");
|
||||
// params.insert("PersistentAction", "string");
|
||||
// params.insert("PersistentAction", "string");
|
||||
params.insert("ShortenUrls", "true");
|
||||
let date = match param.schedule_at {
|
||||
Some(date_value) => date_value.to_string(),
|
||||
@@ -66,7 +60,7 @@ pub async fn send_mssage(
|
||||
let request = client.post(url).headers(headers).form(¶ms);
|
||||
match request.send().await {
|
||||
Ok(response) => match response.status() {
|
||||
reqwest::StatusCode::OK => Ok(response),
|
||||
reqwest::StatusCode::CREATED => Ok(response),
|
||||
status => Err(std::io::Error::other(format!(
|
||||
"Unaccounted status: {status:?}"
|
||||
))),
|
||||
|
||||
Reference in New Issue
Block a user