mylloon.fr/src/routes/not_found.rs
2023-02-09 11:19:53 +01:00

16 lines
364 B
Rust

use actix_web::{HttpResponse, Responder};
use askama::Template;
use crate::template::render_html;
pub async fn page() -> impl Responder {
HttpResponse::NotFound().body(get_page())
}
#[derive(Template)]
#[template(path = "../templates/404.html")]
struct Error404Template {}
pub fn get_page() -> std::string::String {
render_html(&Error404Template {})
}