Confirmation page and minor improvements to homepage and form messages

Basic redirect with flash messages for success and error messages
This commit is contained in:
Alphonse Paix
2025-09-16 16:47:28 +02:00
parent 612a221907
commit 8e1d68d948
12 changed files with 102 additions and 75 deletions

View File

@@ -72,7 +72,7 @@ impl IntoResponse for SubscribeError {
}),
)
.into_response(),
SubscribeError::ValidationError(_) => Redirect::to("/register").into_response(),
SubscribeError::ValidationError(_) => Redirect::to("/").into_response(),
}
}
}
@@ -125,7 +125,7 @@ pub async fn subscribe(
.await
.context("Failed to commit the database transaction to store a new subscriber.")?;
messages.success("A confirmation email has been sent.");
Ok(Redirect::to("/register").into_response())
Ok(Redirect::to("/").into_response())
}
#[tracing::instrument(