Compare commits

..

4 Commits

Author SHA1 Message Date
phoenix a45e43b278 Version bump 2025-09-28 18:59:52 -04:00
phoenix a06f828c8a Code formatting 2025-09-28 18:59:27 -04:00
phoenix 43e0fa8b7e Added functions to get env variables 2025-09-28 18:58:24 -04:00
phoenix d6bf9c8d71 Added keys related to CORS support 2025-09-28 18:52:22 -04:00
-7
View File
@@ -58,10 +58,3 @@ pub async fn get_allowed_origins() -> String {
dotenvy::dotenv().ok();
std::env::var(crate::keys::ALLOWED_ORIGINS).expect(crate::keys::error::ALLOWED_ORIGINS)
}
/// Get environment not specified in the code
pub async fn get_env(environment: &str) -> String {
dotenvy::dotenv().ok();
let my_error = format!("{environment} {}", crate::keys::error::GENERAL_ERROR);
std::env::var(environment).expect(&my_error)
}