tsk-22: Add function to parse env variable to a vector of strings #25
@@ -99,7 +99,6 @@ pub async fn get_allowed_origins() -> crate::EnvVar {
|
|||||||
/// Get environment not specified in the code
|
/// Get environment not specified in the code
|
||||||
pub async fn get_env(environment: &str) -> crate::EnvVar {
|
pub async fn get_env(environment: &str) -> crate::EnvVar {
|
||||||
dotenvy::dotenv().ok();
|
dotenvy::dotenv().ok();
|
||||||
// let key = crate::keys::
|
|
||||||
let my_error = format!("{environment} {}", crate::keys::error::GENERAL_ERROR);
|
let my_error = format!("{environment} {}", crate::keys::error::GENERAL_ERROR);
|
||||||
let value = std::env::var(environment).expect(&my_error);
|
let value = std::env::var(environment).expect(&my_error);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user