Migrate #4

Merged
phoenix merged 26 commits from migrate into v0.1.x 2026-06-06 17:47:45 -04:00
Showing only changes of commit 96eee296d5 - Show all commits
+5 -29
View File
@@ -1,6 +1,6 @@
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())
}
@@ -16,37 +16,13 @@ pub async fn parse_config() -> (textsender_models::config::auxiliary::TwilioConf
config.auth_token = auth_token_var.value;
config.phone_number = phone_number_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)]
mod tests {
#[test]