Config can now be serialized / deserialized

This commit is contained in:
Daniel García
2019-02-02 01:09:21 +01:00
parent 20d8d800f3
commit 86ed75bf7c
8 changed files with 207 additions and 261 deletions

View File

@@ -419,8 +419,8 @@ fn password_hint(data: JsonUpcase<PasswordHintData>, conn: DbConn) -> EmptyResul
None => return Ok(()),
};
if let Some(ref mail_config) = CONFIG.mail() {
mail::send_password_hint(&data.Email, hint, mail_config)?;
if CONFIG.mail_enabled() {
mail::send_password_hint(&data.Email, hint)?;
} else if CONFIG.show_password_hint() {
if let Some(hint) = hint {
err!(format!("Your password hint is: {}", &hint));