HTML and plain text for new post mail notifications

This commit is contained in:
Alphonse Paix
2025-09-21 03:45:29 +02:00
parent 56b25515f9
commit 0725b87bf2
5 changed files with 222 additions and 25 deletions

View File

@@ -112,7 +112,7 @@ pub async fn publish_newsletter(
fn validate_form(form: &BodyData) -> Result<(), &'static str> {
if form.title.is_empty() {
return Err("The title was empty");
return Err("The title was empty.");
}
if form.html.is_empty() || form.text.is_empty() {
return Err("The content was empty.");