blob: 6427a19c60b79ae41ca27ccb25609c9a7e967cdb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
use actix_web::{HttpResponse, Result};
use askama::Template;
#[derive(Template)]
#[template(path = "404.html")]
struct P404;
/// Render a simple 404 page
pub async fn render() -> Result<HttpResponse> {
Ok(HttpResponse::NotFound()
.content_type("text/html")
.body(P404.render().unwrap()))
}
|