tsk-17: Added functionality
This commit is contained in:
@@ -27,3 +27,8 @@ pub async fn get_icarus_base_api_url() -> String {
|
|||||||
dotenvy::dotenv().ok();
|
dotenvy::dotenv().ok();
|
||||||
std::env::var(crate::keys::ICARUS_BASE_API_URL).expect(crate::keys::error::ICARUS_BASE_API_URL)
|
std::env::var(crate::keys::ICARUS_BASE_API_URL).expect(crate::keys::error::ICARUS_BASE_API_URL)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub async fn get_icarus_auth_base_api_url() -> String {
|
||||||
|
dotenvy::dotenv().ok();
|
||||||
|
std::env::var(crate::keys::ICARUS_AUTH_BASE_API_URL).expect(crate::keys::error::ICARUS_AUTH_BASE_API_URL)
|
||||||
|
}
|
||||||
|
@@ -18,6 +18,9 @@ pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY";
|
|||||||
// Environment key for icarus api url
|
// Environment key for icarus api url
|
||||||
pub const ICARUS_BASE_API_URL: &str = "ICARUS_BASE_API_URL";
|
pub const ICARUS_BASE_API_URL: &str = "ICARUS_BASE_API_URL";
|
||||||
|
|
||||||
|
// Environment key for icarus auth api url
|
||||||
|
pub const ICARUS_AUTH_BASE_API_URL: &str = "ICARUS_AUTH_BASE_API_URL";
|
||||||
|
|
||||||
pub mod error {
|
pub mod error {
|
||||||
use const_format::concatcp;
|
use const_format::concatcp;
|
||||||
|
|
||||||
@@ -28,4 +31,5 @@ pub mod error {
|
|||||||
pub const SECRET_KEY: &str = concatcp!(super::SECRET_KEY, " ", GENERAL_ERROR);
|
pub const SECRET_KEY: &str = concatcp!(super::SECRET_KEY, " ", GENERAL_ERROR);
|
||||||
pub const ROOT_DIRECTORY: &str = concatcp!(super::ROOT_DIRECTORY, " ", GENERAL_ERROR);
|
pub const ROOT_DIRECTORY: &str = concatcp!(super::ROOT_DIRECTORY, " ", GENERAL_ERROR);
|
||||||
pub const ICARUS_BASE_API_URL: &str = concatcp!(super::ICARUS_BASE_API_URL, " ", GENERAL_ERROR);
|
pub const ICARUS_BASE_API_URL: &str = concatcp!(super::ICARUS_BASE_API_URL, " ", GENERAL_ERROR);
|
||||||
|
pub const ICARUS_AUTH_BASE_API_URL: &str = concatcp!(super::ICARUS_AUTH_BASE_API_URL, " ", GENERAL_ERROR);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user