add an argument in the macro may_fail to have the account linked in the error template

This commit is contained in:
Didier Link
2018-06-22 00:50:06 +02:00
parent 9abb5887b1
commit b153a9ce2b
4 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ use utils;
#[get("/~/<name>", rank = 2)]
fn details(name: String, conn: DbConn, user: Option<User>) -> Template {
may_fail!(Blog::find_by_fqn(&*conn, name), "Requested blog couldn't be found", |blog| {
may_fail!(user, Blog::find_by_fqn(&*conn, name), "Requested blog couldn't be found", |blog| {
let recents = Post::get_recents_for_blog(&*conn, &blog, 5);
Template::render("blogs/details", json!({