Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4dfd355bd8
|
||
|
|
681a7daab9
|
||
|
|
c613b6011c
|
||
|
|
9bfb594f78
|
+3
-3
@@ -40,15 +40,15 @@ impl SendMsg {
|
|||||||
param: &crate::twilio::types::Parameters,
|
param: &crate::twilio::types::Parameters,
|
||||||
) -> Result<reqwest::Response, std::io::Error> {
|
) -> Result<reqwest::Response, std::io::Error> {
|
||||||
if self.recipient.phone_number.is_empty() {
|
if self.recipient.phone_number.is_empty() {
|
||||||
Err(std::io::Error::other("Recipient not provided"))
|
return Err(std::io::Error::other("Recipient not provided"));
|
||||||
} else if self.message.content.is_empty() {
|
} else if self.message.content.is_empty() {
|
||||||
Err(std::io::Error::other("Message not provided"))
|
return Err(std::io::Error::other("Message not provided"));
|
||||||
} else if self.config.phone_number.is_empty()
|
} else if self.config.phone_number.is_empty()
|
||||||
|| self.config.service_sid.is_empty()
|
|| self.config.service_sid.is_empty()
|
||||||
|| self.config.auth_token.is_empty()
|
|| self.config.auth_token.is_empty()
|
||||||
|| self.config.auth_sid.is_empty()
|
|| self.config.auth_sid.is_empty()
|
||||||
{
|
{
|
||||||
Err(std::io::Error::other("Config not populated"))
|
return Err(std::io::Error::other("Config not populated"));
|
||||||
} else {
|
} else {
|
||||||
let client = match reqwest::Client::builder().build() {
|
let client = match reqwest::Client::builder().build() {
|
||||||
Ok(client) => client,
|
Ok(client) => client,
|
||||||
|
|||||||
Reference in New Issue
Block a user