12 lines
391 B
Rust
12 lines
391 B
Rust
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()
|
|
}
|