Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7593633304
|
||
|
|
2662065de3
|
-22
@@ -1,22 +0,0 @@
|
|||||||
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)
|
crate::init_envvar(key, &value)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_soaricarus_base_api_url() -> crate::EnvVar {
|
pub fn get_icarus_base_api_url() -> crate::EnvVar {
|
||||||
dotenvy::dotenv().ok();
|
dotenvy::dotenv().ok();
|
||||||
let key = crate::keys::SOARICARUS_BASE_API_URL;
|
let key = crate::keys::SOARICARUS_BASE_API_URL;
|
||||||
let value = std::env::var(key).expect(key);
|
let value = std::env::var(key).expect(key);
|
||||||
@@ -46,7 +46,7 @@ pub fn get_soaricarus_base_api_url() -> crate::EnvVar {
|
|||||||
crate::init_envvar(key, &value)
|
crate::init_envvar(key, &value)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_soaricarus_auth_base_api_url() -> crate::EnvVar {
|
pub fn get_icarus_auth_base_api_url() -> crate::EnvVar {
|
||||||
dotenvy::dotenv().ok();
|
dotenvy::dotenv().ok();
|
||||||
let key = crate::keys::SOARICARUS_AUTH_BASE_API_URL;
|
let key = crate::keys::SOARICARUS_AUTH_BASE_API_URL;
|
||||||
let value = std::env::var(key).expect(key);
|
let value = std::env::var(key).expect(key);
|
||||||
|
|||||||
+1
-2
@@ -41,8 +41,7 @@ pub mod error {
|
|||||||
pub const SERVICE_LOGIN: &str = concatcp!(super::SERVICE_PASSPHRASE, " ", GENERAL_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 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 SOARICARUS_BASE_API_URL: &str =
|
pub const SOARICARUS_BASE_API_URL: &str = concatcp!(super::SOARICARUS_BASE_API_URL, " ", GENERAL_ERROR);
|
||||||
concatcp!(super::SOARICARUS_BASE_API_URL, " ", GENERAL_ERROR);
|
|
||||||
pub const SOARICARUS_AUTH_BASE_API_URL: &str =
|
pub const SOARICARUS_AUTH_BASE_API_URL: &str =
|
||||||
concatcp!(super::SOARICARUS_AUTH_BASE_API_URL, " ", GENERAL_ERROR);
|
concatcp!(super::SOARICARUS_AUTH_BASE_API_URL, " ", GENERAL_ERROR);
|
||||||
pub const APP_ENV: &str = concatcp!(super::APP_ENV, " ", GENERAL_ERROR);
|
pub const APP_ENV: &str = concatcp!(super::APP_ENV, " ", GENERAL_ERROR);
|
||||||
|
|||||||
+4
-4
@@ -51,11 +51,11 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_get_soaricarus_base_api_url() {
|
fn test_get_icarus_base_api_url() {
|
||||||
let result = sienvy::environment::get_soaricarus_base_api_url();
|
let result = sienvy::environment::get_icarus_base_api_url();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result.value, "https://soaricarus.com",
|
result.value, "https://icarus.com",
|
||||||
"SOARICARUS_BASE_API_URL does not match {:?}",
|
"ICARUS_BASE_API_URL does not match {:?}",
|
||||||
result
|
result
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user