Centralize configuration and add some new config (#494)

Ideally, if someone could review the idea in [this comment](https://github.com/Plume-org/Plume/issues/273#issuecomment-474982184), I'd like to add the implementation to this pr too
This commit is contained in:
fdb-hiroshima
2019-03-21 10:30:33 +01:00
committed by Baptiste Gelez
parent b945d1f602
commit 65bb50e88f
12 changed files with 117 additions and 89 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ use mail::{build_mail, Mailer};
use plume_models::{
db_conn::DbConn,
users::{User, AUTH_COOKIE},
Error, BASE_URL,
Error, CONFIG,
};
use routes::errors::ErrorPage;
@@ -175,7 +175,7 @@ pub fn password_reset_request(
creation_date: Instant::now(),
});
let link = format!("https://{}/password-reset/{}", *BASE_URL, id);
let link = format!("https://{}/password-reset/{}", CONFIG.base_url, id);
if let Some(message) = build_mail(
form.email.clone(),
i18n!(intl.catalog, "Password reset"),