Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d06c8fdf49 |
+22
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2026 Kun Deng.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
+2
-2
@@ -38,7 +38,7 @@ pub fn get_root_directory() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub fn get_icarus_base_api_url() -> crate::EnvVar {
|
||||
pub fn get_soaricarus_base_api_url() -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let key = crate::keys::SOARICARUS_BASE_API_URL;
|
||||
let value = std::env::var(key).expect(key);
|
||||
@@ -46,7 +46,7 @@ pub fn get_icarus_base_api_url() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub fn get_icarus_auth_base_api_url() -> crate::EnvVar {
|
||||
pub fn get_soaricarus_auth_base_api_url() -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let key = crate::keys::SOARICARUS_AUTH_BASE_API_URL;
|
||||
let value = std::env::var(key).expect(key);
|
||||
|
||||
+2
-1
@@ -41,7 +41,8 @@ pub mod error {
|
||||
pub const SERVICE_LOGIN: &str = concatcp!(super::SERVICE_PASSPHRASE, " ", 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 SOARICARUS_BASE_API_URL: &str = concatcp!(super::SOARICARUS_BASE_API_URL, " ", GENERAL_ERROR);
|
||||
pub const SOARICARUS_BASE_API_URL: &str =
|
||||
concatcp!(super::SOARICARUS_BASE_API_URL, " ", GENERAL_ERROR);
|
||||
pub const SOARICARUS_AUTH_BASE_API_URL: &str =
|
||||
concatcp!(super::SOARICARUS_AUTH_BASE_API_URL, " ", GENERAL_ERROR);
|
||||
pub const APP_ENV: &str = concatcp!(super::APP_ENV, " ", GENERAL_ERROR);
|
||||
|
||||
+4
-4
@@ -51,11 +51,11 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_get_icarus_base_api_url() {
|
||||
let result = sienvy::environment::get_icarus_base_api_url();
|
||||
fn test_get_soaricarus_base_api_url() {
|
||||
let result = sienvy::environment::get_soaricarus_base_api_url();
|
||||
assert_eq!(
|
||||
result.value, "https://icarus.com",
|
||||
"ICARUS_BASE_API_URL does not match {:?}",
|
||||
result.value, "https://soaricarus.com",
|
||||
"SOARICARUS_BASE_API_URL does not match {:?}",
|
||||
result
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user