Compare commits

..

No commits in common. "f793227b82f84ec0938fdd7463767157e121dab7" and "dedaed2281c626edb73035b135333a4f54a76011" have entirely different histories.

3 changed files with 5 additions and 8 deletions

3
.gitignore vendored
View File

@ -7,6 +7,3 @@ Cargo.lock
# Geany proyect config
proyectos
# Rocket Config
Rocket.toml

View File

@ -53,14 +53,14 @@ impl SinglePost {
#[derive(Serialize)]
pub struct NotFound {
title: String,
url: String,
uri: String,
}
impl NotFound {
pub fn new(url: String) -> Self {
pub fn new(uri: String) -> Self {
NotFound {
title: gen_title(),
url,
uri,
}
}
}

View File

@ -98,9 +98,9 @@ fn show_post(title: String) -> Template {
Template::render("post", context)
}
Err(_) => {
let url = format!("/post/{}", title_splited.join("-"));
let uri = format!("/post/{}", title_splited.join("-"));
let context = contexts::NotFound::new(url);
let context = contexts::NotFound::new(uri);
Template::render("404", context)
}