feat: added a route to return discord usernames.

Closes #19
This commit is contained in:
silver 2023-08-27 20:33:43 +01:00
parent ce471ad39a
commit 92fad0dc4b
8 changed files with 352 additions and 122 deletions

View file

@ -189,6 +189,7 @@ pub struct Config {
pub mail_user: String,
pub mail_pass: String,
pub ssh_root: String,
pub auth_discord: String,
}
pub fn get_config() -> Config {
@ -207,6 +208,7 @@ pub fn get_config() -> Config {
mail_user: "".to_string(),
mail_pass: "".to_string(),
ssh_root: "skynet_old".to_string(),
auth_discord: "".to_string(),
};
if let Ok(x) = env::var("LDAP_HOST") {
@ -242,6 +244,9 @@ pub fn get_config() -> Config {
if let Ok(x) = env::var("SSH_ROOT") {
config.ssh_root = x.trim().to_string();
}
if let Ok(x) = env::var("LDAP_DISCORD_AUTH") {
config.auth_discord = x.trim().to_string();
}
config
}