Added function to retrieve environment value of secret key

This commit is contained in:
2025-05-31 20:53:24 -04:00
parent a0f4b96aee
commit 3ccf313355

View File

@@ -9,6 +9,11 @@ pub async fn get_secret_main_key() -> String {
std::env::var(crate::keys::SECRET_MAIN_KEY).expect(crate::keys::error::SECRET_MAIN_KEY) std::env::var(crate::keys::SECRET_MAIN_KEY).expect(crate::keys::error::SECRET_MAIN_KEY)
} }
pub async fn get_secret_key() -> String {
dotenvy::dotenv().ok();
std::env::var(crate::keys::SECRET_KEY).expect(crate::keys::error::SECRET_KEY)
}
pub async fn get_root_directory() -> String { pub async fn get_root_directory() -> String {
dotenvy::dotenv().ok(); dotenvy::dotenv().ok();
std::env::var(crate::keys::ROOT_DIRECTORY).expect(crate::keys::error::ROOT_DIRECTORY) std::env::var(crate::keys::ROOT_DIRECTORY).expect(crate::keys::error::ROOT_DIRECTORY)