Use HTML swap to display success and error messages

This commit is contained in:
Alphonse Paix
2025-09-17 03:40:23 +02:00
parent 88dad022ce
commit 2d336ed000
18 changed files with 134 additions and 232 deletions

13
src/templates.rs Normal file
View File

@@ -0,0 +1,13 @@
use askama::Template;
#[derive(Template)]
#[template(path = "../templates/success.html")]
pub struct SuccessTemplate {
pub success_message: String,
}
#[derive(Template)]
#[template(path = "../templates/error.html")]
pub struct ErrorTemplate {
pub error_message: String,
}