Cleanup
sender Build / Test Suite (pull_request) Successful in 28s
sender Build / Check (pull_request) Successful in 28s
sender Build / Rustfmt (pull_request) Failing after 56s
sender Build / Clippy (pull_request) Successful in 38s
sender Build / build (pull_request) Successful in 28s

This commit is contained in:
2026-06-06 15:56:35 -04:00
parent be7eeec63b
commit 96eee296d5
+5 -29
View File
@@ -1,6 +1,6 @@
pub const APP_NAME: &str = "sender"; pub const APP_NAME: &str = "sender";
pub fn get_paths(args: &Vec<String>) -> (String, String, String) { pub fn get_paths(args: Vec<String>) -> (String, String, String) {
(args[1].clone(), args[2].clone(), args[3].clone()) (args[1].clone(), args[2].clone(), args[3].clone())
} }
@@ -16,37 +16,13 @@ pub async fn parse_config() -> (textsender_models::config::auxiliary::TwilioConf
config.auth_token = auth_token_var.value; config.auth_token = auth_token_var.value;
config.phone_number = phone_number_var.value; config.phone_number = phone_number_var.value;
config.service_sid = service_sid_var.value; config.service_sid = service_sid_var.value;
let success = {
!config.account_sid.is_empty() && !config.auth_token.is_empty() && !config.phone_number.is_empty() && !config.service_sid.is_empty()
};
(config, true) (config, success)
} }
/*
axlry "git.kundeng.us/phoenix/textsender-models/tx0/config/auxiliary"
)
func ParseConfig(filepath string) (config axlry.TwilioConfig, success bool) {
content, err := os.ReadFile(filepath)
log.Println("Reading config file...")
log.Println(filepath)
if err != nil {
log.Println("An error reading the file")
return
}
err = json.Unmarshal(content, &config)
if err != nil {
log.Println("An error occurred")
return config, false
}
return config, true
}
*/
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
#[test] #[test]