Register form and confirmation messages

This commit is contained in:
Alphonse Paix
2025-09-04 23:39:53 +02:00
parent f8dee295cd
commit a4104ca1b2
15 changed files with 169 additions and 53 deletions

11
src/routes/register.rs Normal file
View File

@@ -0,0 +1,11 @@
use axum::response::{Html, IntoResponse, Response};
use axum_messages::Messages;
use std::fmt::Write;
pub async fn register(messages: Messages) -> Response {
let mut error_html = String::new();
for message in messages {
writeln!(error_html, "<p><i>{}</i></p>", message).unwrap();
}
Html(format!(include_str!("register/register.html"), error_html)).into_response()
}