Updating references
This commit is contained in:
+1
-1
@@ -11,6 +11,6 @@ serde_json = { version = "1.0.150" }
|
|||||||
reqwest = { version = "0.13.4", features = ["form", "json", "blocking", "multipart", "stream"] }
|
reqwest = { version = "0.13.4", features = ["form", "json", "blocking", "multipart", "stream"] }
|
||||||
time = { version = "0.3.53", features = ["formatting", "macros", "parsing", "serde"] }
|
time = { version = "0.3.53", features = ["formatting", "macros", "parsing", "serde"] }
|
||||||
base64-ng = { version = "1.3.7" }
|
base64-ng = { version = "1.3.7" }
|
||||||
textsender_models = { git = "ssh://git@git.kundeng.us/phoenix/textsender_models.git", tag = "v0.5.2", features = ["config", "contact", "message"] }
|
schedtxt_models = { git = "ssh://git@git.kundeng.us/phoenix/schedtxt_models.git", tag = "v0.5.3", features = ["config", "contact", "message"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ pub use send_message as send_mssage;
|
|||||||
|
|
||||||
/// Send a message
|
/// Send a message
|
||||||
pub async fn send_message(
|
pub async fn send_message(
|
||||||
msg: &textsender_models::message::Message,
|
msg: &schedtxt_models::message::Message,
|
||||||
contact: &textsender_models::contact::Contact,
|
contact: &schedtxt_models::contact::Contact,
|
||||||
param: &crate::twilio::types::Parameters,
|
param: &crate::twilio::types::Parameters,
|
||||||
config: &textsender_models::config::auxiliary::TwilioConfig,
|
config: &schedtxt_models::config::auxiliary::TwilioConfig,
|
||||||
) -> Result<reqwest::Response, std::io::Error> {
|
) -> Result<reqwest::Response, std::io::Error> {
|
||||||
if config.account_sid.is_empty() {
|
if config.account_sid.is_empty() {
|
||||||
Err(std::io::Error::other("Account SID is empty"))
|
Err(std::io::Error::other("Account SID is empty"))
|
||||||
@@ -145,9 +145,9 @@ pub fn initial_params(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn init_params(
|
fn init_params(
|
||||||
contact: &textsender_models::contact::Contact,
|
contact: &schedtxt_models::contact::Contact,
|
||||||
message: &textsender_models::message::Message,
|
message: &schedtxt_models::message::Message,
|
||||||
config: &textsender_models::config::auxiliary::TwilioConfig,
|
config: &schedtxt_models::config::auxiliary::TwilioConfig,
|
||||||
param: &crate::twilio::types::Parameters,
|
param: &crate::twilio::types::Parameters,
|
||||||
) -> std::collections::HashMap<String, String> {
|
) -> std::collections::HashMap<String, String> {
|
||||||
let now = time::OffsetDateTime::now_utc();
|
let now = time::OffsetDateTime::now_utc();
|
||||||
@@ -213,7 +213,7 @@ fn convert_time_to_iso(time: time::OffsetDateTime) -> Result<String, time::error
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn generate_auth(
|
fn generate_auth(
|
||||||
config: &textsender_models::config::auxiliary::TwilioConfig,
|
config: &schedtxt_models::config::auxiliary::TwilioConfig,
|
||||||
) -> Result<String, base64_ng::EncodeError> {
|
) -> Result<String, base64_ng::EncodeError> {
|
||||||
let input = format!("{}:{}", config.account_sid, config.auth_token);
|
let input = format!("{}:{}", config.account_sid, config.auth_token);
|
||||||
match base64_ng::encode(input.as_bytes()) {
|
match base64_ng::encode(input.as_bytes()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user