add an argument in the macro may_fail to have the account linked in the error template
This commit is contained in:
+1
-1
@@ -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!({
|
||||
|
||||
Reference in New Issue
Block a user