Compare commits
4 Commits
v0.3.3-20-
...
v0.3.3-19-
Author | SHA1 | Date | |
---|---|---|---|
a45e43b278
|
|||
a06f828c8a
|
|||
43e0fa8b7e
|
|||
d6bf9c8d71
|
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user