diff --git a/src/lib.rs b/src/lib.rs index 6abc48a..a3b4edf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,6 +24,8 @@ pub struct Config { // wolves API base for clubs/socs pub wolves_url: String, + // API key for accessing more general resources + pub wolves_api: String, } impl TypeMapKey for Config { type Value = Arc>; @@ -44,6 +46,7 @@ pub fn get_config() -> Config { mail_user: "".to_string(), mail_pass: "".to_string(), wolves_url: "".to_string(), + wolves_api: "".to_string(), }; if let Ok(x) = env::var("DATABASE_HOME") { @@ -74,6 +77,10 @@ pub fn get_config() -> Config { config.wolves_url = x.trim().to_string(); } + if let Ok(x) = env::var("WOLVES_API") { + config.wolves_api = x.trim().to_string(); + } + config }