fix: env var prefix, set to LPFORMS

This commit is contained in:
Aravinth Manivannan 2022-09-08 18:00:26 +05:30
parent e1386fd6c7
commit bc1f75e650
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88

View file

@ -78,9 +78,9 @@ impl Settings {
let mut s = Config::new();
const CURRENT_DIR: &str = "./config/default.toml";
const ETC: &str = "/etc/rwook/config.toml";
const ETC: &str = "/etc/lpforms/config.toml";
if let Ok(path) = env::var("RWHOOK_CONFIG") {
if let Ok(path) = env::var("LPFORMS") {
s.merge(File::with_name(&path))?;
} else if Path::new(CURRENT_DIR).exists() {
// merging default config from file
@ -91,7 +91,7 @@ impl Settings {
log::warn!("configuration file not found");
}
s.merge(Environment::with_prefix("RWHOOK").separator("_"))?;
s.merge(Environment::with_prefix("LPFORMS").separator("_"))?;
check_url(&s);