fix(mail): incorrect alias and error logs (#2346)

This commit is contained in:
Ellie Huxtable 2024-08-06 14:31:41 +01:00 committed by GitHub
parent 90e7d28173
commit 2811e5631b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -203,6 +203,7 @@ pub async fn send_verification<DB: Database>(
let postmark_token = if let Some(token) = settings.mail.postmark.token {
token
} else {
error!("Failed to verify email: got None for postmark token");
return Err(ErrorResponse::reply("mail not configured")
.with_status(StatusCode::INTERNAL_SERVER_ERROR));
};

View File

@ -23,7 +23,7 @@ pub struct Mail {
#[derive(Default, Clone, Debug, Deserialize, Serialize)]
pub struct Postmark {
#[serde(alias = "enable")]
#[serde(alias = "token")]
pub token: Option<String>,
}