|
@@ -36,7 +36,7 @@ pub struct Config {
|
|
pub username: String,
|
|
pub username: String,
|
|
pub password: String,
|
|
pub password: String,
|
|
pub api_addr: String,
|
|
pub api_addr: String,
|
|
- pub api_port: String, // TODO make int instead of string?
|
|
|
|
|
|
+ pub api_port: u32,
|
|
pub smtp_domain: String,
|
|
pub smtp_domain: String,
|
|
pub smtp_port: u32,
|
|
pub smtp_port: u32,
|
|
pub sonic_search_addr: String,
|
|
pub sonic_search_addr: String,
|
|
@@ -58,7 +58,7 @@ impl Config {
|
|
"password" => self.password = value.to_string(),
|
|
"password" => self.password = value.to_string(),
|
|
"maildir" => self.maildir = PathBuf::from(value),
|
|
"maildir" => self.maildir = PathBuf::from(value),
|
|
"api_addr" => self.api_addr = value.to_string(),
|
|
"api_addr" => self.api_addr = value.to_string(),
|
|
- "api_port" => self.api_port = value.to_string(),
|
|
|
|
|
|
+ "api_port" => self.api_port = value.parse().unwrap(),
|
|
"smtp_domain" => self.smtp_domain = value.to_string(),
|
|
"smtp_domain" => self.smtp_domain = value.to_string(),
|
|
"smtp_port" => self.smtp_port = value.parse().unwrap(),
|
|
"smtp_port" => self.smtp_port = value.parse().unwrap(),
|
|
"sonic_search_addr" => self.sonic_search_addr = value.to_string(),
|
|
"sonic_search_addr" => self.sonic_search_addr = value.to_string(),
|