Compare commits
No commits in common. "f793227b82f84ec0938fdd7463767157e121dab7" and "dedaed2281c626edb73035b135333a4f54a76011" have entirely different histories.
f793227b82
...
dedaed2281
|
@ -7,6 +7,3 @@ Cargo.lock
|
|||
|
||||
# Geany proyect config
|
||||
proyectos
|
||||
|
||||
# Rocket Config
|
||||
Rocket.toml
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue