Add IP location service
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -6,6 +6,7 @@ use crate::actors::bruteforce_actor::BruteForceActor;
|
||||
use crate::actors::users_actor::UsersActor;
|
||||
use crate::actors::{bruteforce_actor, users_actor};
|
||||
use crate::constants::{APP_NAME, MAX_FAILED_LOGIN_ATTEMPTS, MIN_PASS_LEN};
|
||||
use crate::data::app_config::AppConfig;
|
||||
use crate::data::current_user::CurrentUser;
|
||||
use crate::data::remote_ip::RemoteIP;
|
||||
use crate::data::user::User;
|
||||
@ -18,6 +19,7 @@ pub(crate) struct BaseSettingsPage {
|
||||
pub is_admin: bool,
|
||||
pub user_name: String,
|
||||
pub version: &'static str,
|
||||
pub ip_location_api: Option<&'static str>,
|
||||
}
|
||||
|
||||
impl BaseSettingsPage {
|
||||
@ -35,6 +37,7 @@ impl BaseSettingsPage {
|
||||
is_admin: user.admin,
|
||||
user_name: user.username.to_string(),
|
||||
version: env!("CARGO_PKG_VERSION"),
|
||||
ip_location_api: AppConfig::get().ip_location_service.as_deref(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user