16 lines
364 B
Rust
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 {})
|
|
}
|