tsk-22: Add function to parse env variable to a vector of strings #25

Merged
phoenix merged 8 commits from tsk-22 into main 2025-10-10 19:14:15 +00:00
Showing only changes of commit 218b0f60a9 - Show all commits

View File

@@ -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);